diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated | 26325 |
1 files changed, 26325 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated new file mode 100644 index 00000000..5ac9e1dc --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated | |||
@@ -0,0 +1,26325 @@ | |||
1 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
2 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
3 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
4 | |||
5 | ////////// | ||
6 | // 0. Util | ||
7 | ////////// | ||
8 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9 | PartialInterpretation.problem(interpretation,problem); | ||
10 | } | ||
11 | |||
12 | ///////////////////////// | ||
13 | // 0.1 Existence | ||
14 | ///////////////////////// | ||
15 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16 | find interpretation(problem,interpretation); | ||
17 | LogicProblem.elements(problem,element); | ||
18 | } or { | ||
19 | find interpretation(problem,interpretation); | ||
20 | PartialInterpretation.newElements(interpretation,element); | ||
21 | } | ||
22 | |||
23 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24 | find mustExist(problem,interpretation,element); | ||
25 | } or { | ||
26 | find interpretation(problem,interpretation); | ||
27 | neg find elementCloseWorld(element); | ||
28 | PartialInterpretation.openWorldElements(interpretation,element); | ||
29 | } | ||
30 | |||
31 | private pattern elementCloseWorld(element:DefinedElement) { | ||
32 | PartialInterpretation.openWorldElements(i,element); | ||
33 | PartialInterpretation.maxNewElements(i,0); | ||
34 | } or { | ||
35 | Scope.targetTypeInterpretation(scope,interpretation); | ||
36 | PartialTypeInterpratation.elements(interpretation,element); | ||
37 | Scope.maxNewElements(scope,0); | ||
38 | } | ||
39 | |||
40 | //////////////////////// | ||
41 | // 0.2 Equivalence | ||
42 | //////////////////////// | ||
43 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
44 | find mayExist(problem,interpretation,a); | ||
45 | find mayExist(problem,interpretation,b); | ||
46 | a == b; | ||
47 | } | ||
48 | |||
49 | //////////////////////// | ||
50 | // 0.3 Required Patterns by TypeIndexer | ||
51 | //////////////////////// | ||
52 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
53 | find interpretation(problem,interpretation); | ||
54 | LogicProblem.types(problem,type); | ||
55 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
56 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
57 | } | ||
58 | |||
59 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
60 | find interpretation(problem,interpretation); | ||
61 | LogicProblem.types(problem,type); | ||
62 | TypeDefinition.elements(type,element); | ||
63 | } or { | ||
64 | find interpretation(problem,interpretation); | ||
65 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
66 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
67 | } | ||
68 | |||
69 | private pattern isPrimitive(element: PrimitiveElement) { | ||
70 | PrimitiveElement(element); | ||
71 | } | ||
72 | |||
73 | ////////// | ||
74 | // 1. Problem-Specific Base Indexers | ||
75 | ////////// | ||
76 | // 1.1 Type Indexers | ||
77 | ////////// | ||
78 | // 1.1.1 primitive Type Indexers | ||
79 | ////////// | ||
80 | |||
81 | ////////// | ||
82 | // 1.1.2 domain-specific Type Indexers | ||
83 | ////////// | ||
84 | /** | ||
85 | * An element must be an instance of type "Pseudostate class". | ||
86 | */ | ||
87 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
88 | Type.name(type,"Pseudostate class"); | ||
89 | find directInstanceOf(problem,interpretation,element,type); | ||
90 | } | ||
91 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
92 | find interpretation(problem,interpretation); | ||
93 | PartialInterpretation.scopes(interpretation,scope); | ||
94 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
95 | Scope.maxNewElements(scope,0); | ||
96 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
97 | Type.name(type,"Pseudostate class"); | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * An element may be an instance of type "Pseudostate class". | ||
102 | */ | ||
103 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
104 | { | ||
105 | find interpretation(problem,interpretation); | ||
106 | PartialInterpretation.newElements(interpretation,element); | ||
107 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
108 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
109 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
110 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
111 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
112 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
113 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
114 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
115 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
116 | neg find isPrimitive(element); | ||
117 | } or { | ||
118 | find interpretation(problem,interpretation); | ||
119 | PartialInterpretation.openWorldElements(interpretation,element); | ||
120 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
121 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
122 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
123 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
124 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
125 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
126 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
127 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
128 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
129 | neg find isPrimitive(element); | ||
130 | } or | ||
131 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
132 | /** | ||
133 | * An element must be an instance of type "Vertex class". | ||
134 | */ | ||
135 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
136 | Type.name(type,"Vertex class"); | ||
137 | find directInstanceOf(problem,interpretation,element,type); | ||
138 | } | ||
139 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
140 | find interpretation(problem,interpretation); | ||
141 | PartialInterpretation.scopes(interpretation,scope); | ||
142 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
143 | Scope.maxNewElements(scope,0); | ||
144 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
145 | Type.name(type,"Vertex class"); | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * An element may be an instance of type "Vertex class". | ||
150 | */ | ||
151 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
152 | { | ||
153 | find interpretation(problem,interpretation); | ||
154 | PartialInterpretation.newElements(interpretation,element); | ||
155 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
156 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
157 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
158 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
159 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
160 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
161 | neg find isPrimitive(element); | ||
162 | } or { | ||
163 | find interpretation(problem,interpretation); | ||
164 | PartialInterpretation.openWorldElements(interpretation,element); | ||
165 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
166 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
167 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
168 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
169 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
170 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
171 | neg find isPrimitive(element); | ||
172 | } or | ||
173 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
174 | /** | ||
175 | * An element must be an instance of type "Region class". | ||
176 | */ | ||
177 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
178 | Type.name(type,"Region class"); | ||
179 | find directInstanceOf(problem,interpretation,element,type); | ||
180 | } | ||
181 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
182 | find interpretation(problem,interpretation); | ||
183 | PartialInterpretation.scopes(interpretation,scope); | ||
184 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
185 | Scope.maxNewElements(scope,0); | ||
186 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
187 | Type.name(type,"Region class"); | ||
188 | } | ||
189 | |||
190 | /** | ||
191 | * An element may be an instance of type "Region class". | ||
192 | */ | ||
193 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
194 | { | ||
195 | find interpretation(problem,interpretation); | ||
196 | PartialInterpretation.newElements(interpretation,element); | ||
197 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
198 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
199 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
200 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
201 | neg find isPrimitive(element); | ||
202 | } or { | ||
203 | find interpretation(problem,interpretation); | ||
204 | PartialInterpretation.openWorldElements(interpretation,element); | ||
205 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
206 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
207 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
208 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
209 | neg find isPrimitive(element); | ||
210 | } or | ||
211 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
212 | /** | ||
213 | * An element must be an instance of type "Transition class". | ||
214 | */ | ||
215 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
216 | Type.name(type,"Transition class"); | ||
217 | find directInstanceOf(problem,interpretation,element,type); | ||
218 | } | ||
219 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
220 | find interpretation(problem,interpretation); | ||
221 | PartialInterpretation.scopes(interpretation,scope); | ||
222 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
223 | Scope.maxNewElements(scope,0); | ||
224 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
225 | Type.name(type,"Transition class"); | ||
226 | } | ||
227 | |||
228 | /** | ||
229 | * An element may be an instance of type "Transition class". | ||
230 | */ | ||
231 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
232 | { | ||
233 | find interpretation(problem,interpretation); | ||
234 | PartialInterpretation.newElements(interpretation,element); | ||
235 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
236 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
237 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
238 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
239 | neg find isPrimitive(element); | ||
240 | } or { | ||
241 | find interpretation(problem,interpretation); | ||
242 | PartialInterpretation.openWorldElements(interpretation,element); | ||
243 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
244 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
245 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
246 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
247 | neg find isPrimitive(element); | ||
248 | } or | ||
249 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
250 | /** | ||
251 | * An element must be an instance of type "Statechart class". | ||
252 | */ | ||
253 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
254 | Type.name(type,"Statechart class"); | ||
255 | find directInstanceOf(problem,interpretation,element,type); | ||
256 | } | ||
257 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
258 | find interpretation(problem,interpretation); | ||
259 | PartialInterpretation.scopes(interpretation,scope); | ||
260 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
261 | Scope.maxNewElements(scope,0); | ||
262 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
263 | Type.name(type,"Statechart class"); | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * An element may be an instance of type "Statechart class". | ||
268 | */ | ||
269 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
270 | { | ||
271 | find interpretation(problem,interpretation); | ||
272 | PartialInterpretation.newElements(interpretation,element); | ||
273 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
274 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
275 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
276 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
277 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
278 | neg find isPrimitive(element); | ||
279 | } or { | ||
280 | find interpretation(problem,interpretation); | ||
281 | PartialInterpretation.openWorldElements(interpretation,element); | ||
282 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
283 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
284 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
285 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
286 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
287 | neg find isPrimitive(element); | ||
288 | } or | ||
289 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
290 | /** | ||
291 | * An element must be an instance of type "Entry class". | ||
292 | */ | ||
293 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
294 | Type.name(type,"Entry class"); | ||
295 | find directInstanceOf(problem,interpretation,element,type); | ||
296 | } | ||
297 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
298 | find interpretation(problem,interpretation); | ||
299 | PartialInterpretation.scopes(interpretation,scope); | ||
300 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
301 | Scope.maxNewElements(scope,0); | ||
302 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
303 | Type.name(type,"Entry class"); | ||
304 | } | ||
305 | |||
306 | /** | ||
307 | * An element may be an instance of type "Entry class". | ||
308 | */ | ||
309 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
310 | { | ||
311 | find interpretation(problem,interpretation); | ||
312 | PartialInterpretation.newElements(interpretation,element); | ||
313 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
314 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
315 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
316 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
317 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
318 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
319 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
320 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
321 | neg find isPrimitive(element); | ||
322 | } or { | ||
323 | find interpretation(problem,interpretation); | ||
324 | PartialInterpretation.openWorldElements(interpretation,element); | ||
325 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
326 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
327 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
328 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
329 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
330 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
331 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
332 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
333 | neg find isPrimitive(element); | ||
334 | } or | ||
335 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
336 | /** | ||
337 | * An element must be an instance of type "Synchronization class". | ||
338 | */ | ||
339 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
340 | Type.name(type,"Synchronization class"); | ||
341 | find directInstanceOf(problem,interpretation,element,type); | ||
342 | } | ||
343 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
344 | find interpretation(problem,interpretation); | ||
345 | PartialInterpretation.scopes(interpretation,scope); | ||
346 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
347 | Scope.maxNewElements(scope,0); | ||
348 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
349 | Type.name(type,"Synchronization class"); | ||
350 | } | ||
351 | |||
352 | /** | ||
353 | * An element may be an instance of type "Synchronization class". | ||
354 | */ | ||
355 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
356 | { | ||
357 | find interpretation(problem,interpretation); | ||
358 | PartialInterpretation.newElements(interpretation,element); | ||
359 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
360 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
361 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
362 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
363 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
364 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
365 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
366 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
367 | neg find isPrimitive(element); | ||
368 | } or { | ||
369 | find interpretation(problem,interpretation); | ||
370 | PartialInterpretation.openWorldElements(interpretation,element); | ||
371 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
372 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
373 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
374 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
375 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
376 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
377 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
378 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
379 | neg find isPrimitive(element); | ||
380 | } or | ||
381 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
382 | /** | ||
383 | * An element must be an instance of type "State class". | ||
384 | */ | ||
385 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
386 | Type.name(type,"State class"); | ||
387 | find directInstanceOf(problem,interpretation,element,type); | ||
388 | } | ||
389 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
390 | find interpretation(problem,interpretation); | ||
391 | PartialInterpretation.scopes(interpretation,scope); | ||
392 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
393 | Scope.maxNewElements(scope,0); | ||
394 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
395 | Type.name(type,"State class"); | ||
396 | } | ||
397 | |||
398 | /** | ||
399 | * An element may be an instance of type "State class". | ||
400 | */ | ||
401 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
402 | { | ||
403 | find interpretation(problem,interpretation); | ||
404 | PartialInterpretation.newElements(interpretation,element); | ||
405 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
406 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
407 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
408 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
409 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
410 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
411 | neg find isPrimitive(element); | ||
412 | } or { | ||
413 | find interpretation(problem,interpretation); | ||
414 | PartialInterpretation.openWorldElements(interpretation,element); | ||
415 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
416 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
417 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
418 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
419 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
420 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
421 | neg find isPrimitive(element); | ||
422 | } or | ||
423 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
424 | /** | ||
425 | * An element must be an instance of type "RegularState class". | ||
426 | */ | ||
427 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
428 | Type.name(type,"RegularState class"); | ||
429 | find directInstanceOf(problem,interpretation,element,type); | ||
430 | } | ||
431 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
432 | find interpretation(problem,interpretation); | ||
433 | PartialInterpretation.scopes(interpretation,scope); | ||
434 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
435 | Scope.maxNewElements(scope,0); | ||
436 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
437 | Type.name(type,"RegularState class"); | ||
438 | } | ||
439 | |||
440 | /** | ||
441 | * An element may be an instance of type "RegularState class". | ||
442 | */ | ||
443 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
444 | { | ||
445 | find interpretation(problem,interpretation); | ||
446 | PartialInterpretation.newElements(interpretation,element); | ||
447 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
448 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
449 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
450 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
451 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
452 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
453 | neg find isPrimitive(element); | ||
454 | } or { | ||
455 | find interpretation(problem,interpretation); | ||
456 | PartialInterpretation.openWorldElements(interpretation,element); | ||
457 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
458 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
459 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
460 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
461 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
462 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
463 | neg find isPrimitive(element); | ||
464 | } or | ||
465 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
466 | /** | ||
467 | * An element must be an instance of type "CompositeElement class". | ||
468 | */ | ||
469 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
470 | Type.name(type,"CompositeElement class"); | ||
471 | find directInstanceOf(problem,interpretation,element,type); | ||
472 | } | ||
473 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
474 | find interpretation(problem,interpretation); | ||
475 | PartialInterpretation.scopes(interpretation,scope); | ||
476 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
477 | Scope.maxNewElements(scope,0); | ||
478 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
479 | Type.name(type,"CompositeElement class"); | ||
480 | } | ||
481 | |||
482 | /** | ||
483 | * An element may be an instance of type "CompositeElement class". | ||
484 | */ | ||
485 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
486 | { | ||
487 | find interpretation(problem,interpretation); | ||
488 | PartialInterpretation.newElements(interpretation,element); | ||
489 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
490 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
491 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
492 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
493 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
494 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
495 | neg find isPrimitive(element); | ||
496 | } or { | ||
497 | find interpretation(problem,interpretation); | ||
498 | PartialInterpretation.openWorldElements(interpretation,element); | ||
499 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
500 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
501 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
502 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
503 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
504 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
505 | neg find isPrimitive(element); | ||
506 | } or | ||
507 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
508 | /** | ||
509 | * An element must be an instance of type "Choice class". | ||
510 | */ | ||
511 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
512 | Type.name(type,"Choice class"); | ||
513 | find directInstanceOf(problem,interpretation,element,type); | ||
514 | } | ||
515 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
516 | find interpretation(problem,interpretation); | ||
517 | PartialInterpretation.scopes(interpretation,scope); | ||
518 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
519 | Scope.maxNewElements(scope,0); | ||
520 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
521 | Type.name(type,"Choice class"); | ||
522 | } | ||
523 | |||
524 | /** | ||
525 | * An element may be an instance of type "Choice class". | ||
526 | */ | ||
527 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
528 | { | ||
529 | find interpretation(problem,interpretation); | ||
530 | PartialInterpretation.newElements(interpretation,element); | ||
531 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
532 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
533 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
534 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
535 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
536 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
537 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
538 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
539 | neg find isPrimitive(element); | ||
540 | } or { | ||
541 | find interpretation(problem,interpretation); | ||
542 | PartialInterpretation.openWorldElements(interpretation,element); | ||
543 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
544 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
545 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
546 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
547 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
548 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
549 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
550 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
551 | neg find isPrimitive(element); | ||
552 | } or | ||
553 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
554 | /** | ||
555 | * An element must be an instance of type "Exit class". | ||
556 | */ | ||
557 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
558 | Type.name(type,"Exit class"); | ||
559 | find directInstanceOf(problem,interpretation,element,type); | ||
560 | } | ||
561 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
562 | find interpretation(problem,interpretation); | ||
563 | PartialInterpretation.scopes(interpretation,scope); | ||
564 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
565 | Scope.maxNewElements(scope,0); | ||
566 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
567 | Type.name(type,"Exit class"); | ||
568 | } | ||
569 | |||
570 | /** | ||
571 | * An element may be an instance of type "Exit class". | ||
572 | */ | ||
573 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
574 | { | ||
575 | find interpretation(problem,interpretation); | ||
576 | PartialInterpretation.newElements(interpretation,element); | ||
577 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
578 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
579 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
580 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
581 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
582 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
583 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
584 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
585 | neg find isPrimitive(element); | ||
586 | } or { | ||
587 | find interpretation(problem,interpretation); | ||
588 | PartialInterpretation.openWorldElements(interpretation,element); | ||
589 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
590 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
591 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
592 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
593 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
594 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
595 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
596 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
597 | neg find isPrimitive(element); | ||
598 | } or | ||
599 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
600 | /** | ||
601 | * An element must be an instance of type "FinalState class". | ||
602 | */ | ||
603 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
604 | Type.name(type,"FinalState class"); | ||
605 | find directInstanceOf(problem,interpretation,element,type); | ||
606 | } | ||
607 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
608 | find interpretation(problem,interpretation); | ||
609 | PartialInterpretation.scopes(interpretation,scope); | ||
610 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
611 | Scope.maxNewElements(scope,0); | ||
612 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
613 | Type.name(type,"FinalState class"); | ||
614 | } | ||
615 | |||
616 | /** | ||
617 | * An element may be an instance of type "FinalState class". | ||
618 | */ | ||
619 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
620 | { | ||
621 | find interpretation(problem,interpretation); | ||
622 | PartialInterpretation.newElements(interpretation,element); | ||
623 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
624 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
625 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
626 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
627 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
628 | neg find isPrimitive(element); | ||
629 | } or { | ||
630 | find interpretation(problem,interpretation); | ||
631 | PartialInterpretation.openWorldElements(interpretation,element); | ||
632 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
633 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
634 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
635 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
636 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
637 | neg find isPrimitive(element); | ||
638 | } or | ||
639 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
640 | /** | ||
641 | * An element must be an instance of type "Statechart class DefinedPart". | ||
642 | */ | ||
643 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
644 | Type.name(type,"Statechart class DefinedPart"); | ||
645 | find directInstanceOf(problem,interpretation,element,type); | ||
646 | } | ||
647 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
648 | find interpretation(problem,interpretation); | ||
649 | PartialInterpretation.scopes(interpretation,scope); | ||
650 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
651 | Scope.maxNewElements(scope,0); | ||
652 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
653 | Type.name(type,"Statechart class DefinedPart"); | ||
654 | } | ||
655 | |||
656 | /** | ||
657 | * An element may be an instance of type "Statechart class DefinedPart". | ||
658 | */ | ||
659 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
660 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
661 | /** | ||
662 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
663 | */ | ||
664 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
665 | Type.name(type,"Statechart class UndefinedPart"); | ||
666 | find directInstanceOf(problem,interpretation,element,type); | ||
667 | } | ||
668 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
669 | find interpretation(problem,interpretation); | ||
670 | PartialInterpretation.scopes(interpretation,scope); | ||
671 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
672 | Scope.maxNewElements(scope,0); | ||
673 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
674 | Type.name(type,"Statechart class UndefinedPart"); | ||
675 | } | ||
676 | |||
677 | /** | ||
678 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
679 | */ | ||
680 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
681 | { | ||
682 | find interpretation(problem,interpretation); | ||
683 | PartialInterpretation.newElements(interpretation,element); | ||
684 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
685 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
686 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
687 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
688 | neg find isPrimitive(element); | ||
689 | } or { | ||
690 | find interpretation(problem,interpretation); | ||
691 | PartialInterpretation.openWorldElements(interpretation,element); | ||
692 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
693 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
694 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
695 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
696 | neg find isPrimitive(element); | ||
697 | } or | ||
698 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
699 | /** | ||
700 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
701 | */ | ||
702 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
703 | Type.name(type,"CompositeElement class DefinedPart"); | ||
704 | find directInstanceOf(problem,interpretation,element,type); | ||
705 | } | ||
706 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
707 | find interpretation(problem,interpretation); | ||
708 | PartialInterpretation.scopes(interpretation,scope); | ||
709 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
710 | Scope.maxNewElements(scope,0); | ||
711 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
712 | Type.name(type,"CompositeElement class DefinedPart"); | ||
713 | } | ||
714 | |||
715 | /** | ||
716 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
717 | */ | ||
718 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
719 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
720 | /** | ||
721 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
722 | */ | ||
723 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
724 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
725 | find directInstanceOf(problem,interpretation,element,type); | ||
726 | } | ||
727 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
728 | find interpretation(problem,interpretation); | ||
729 | PartialInterpretation.scopes(interpretation,scope); | ||
730 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
731 | Scope.maxNewElements(scope,0); | ||
732 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
733 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
734 | } | ||
735 | |||
736 | /** | ||
737 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
738 | */ | ||
739 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
740 | { | ||
741 | find interpretation(problem,interpretation); | ||
742 | PartialInterpretation.newElements(interpretation,element); | ||
743 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
744 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
745 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
746 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
747 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
748 | neg find isPrimitive(element); | ||
749 | } or { | ||
750 | find interpretation(problem,interpretation); | ||
751 | PartialInterpretation.openWorldElements(interpretation,element); | ||
752 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
753 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
754 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
755 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
756 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
757 | neg find isPrimitive(element); | ||
758 | } or | ||
759 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
760 | |||
761 | ////////// | ||
762 | // 1.2 Relation Declaration Indexers | ||
763 | ////////// | ||
764 | /** | ||
765 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
766 | */ | ||
767 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
768 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
769 | source: DefinedElement, target:DefinedElement) | ||
770 | { | ||
771 | find interpretation(problem,interpretation); | ||
772 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
773 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
774 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
775 | BinaryElementRelationLink.param1(link,source); | ||
776 | BinaryElementRelationLink.param2(link,target); | ||
777 | } | ||
778 | /** | ||
779 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
780 | */ | ||
781 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
782 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
783 | source: DefinedElement, target:DefinedElement) | ||
784 | { | ||
785 | find interpretation(problem,interpretation); | ||
786 | // The two endpoint of the link have to exist | ||
787 | find mayExist(problem, interpretation, source); | ||
788 | find mayExist(problem, interpretation, target); | ||
789 | // Type consistency | ||
790 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
791 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
792 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
793 | // the upper bound of the opposite reference multiplicity should be considered. | ||
794 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
795 | check(numberOfExistingOppositeReferences < 1); | ||
796 | } or { | ||
797 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
798 | } | ||
799 | /** | ||
800 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
801 | */ | ||
802 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
803 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
804 | source: DefinedElement, target:DefinedElement) | ||
805 | { | ||
806 | find interpretation(problem,interpretation); | ||
807 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
808 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
809 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
810 | BinaryElementRelationLink.param1(link,source); | ||
811 | BinaryElementRelationLink.param2(link,target); | ||
812 | } | ||
813 | /** | ||
814 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
815 | */ | ||
816 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
817 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
818 | source: DefinedElement, target:DefinedElement) | ||
819 | { | ||
820 | find interpretation(problem,interpretation); | ||
821 | // The two endpoint of the link have to exist | ||
822 | find mayExist(problem, interpretation, source); | ||
823 | find mayExist(problem, interpretation, target); | ||
824 | // Type consistency | ||
825 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
826 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
827 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
828 | // the upper bound of the opposite reference multiplicity should be considered. | ||
829 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
830 | check(numberOfExistingOppositeReferences < 1); | ||
831 | // The reference is containment, then a new reference cannot be create if: | ||
832 | // 1. Multiple parents | ||
833 | neg find mustContains4(problem,interpretation,_,target); | ||
834 | // 2. Circle in the containment hierarchy | ||
835 | neg find mustTransitiveContains(source,target); | ||
836 | } or { | ||
837 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
838 | } | ||
839 | /** | ||
840 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
841 | */ | ||
842 | private pattern mustInRelationvertices_reference_Region( | ||
843 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
844 | source: DefinedElement, target:DefinedElement) | ||
845 | { | ||
846 | find interpretation(problem,interpretation); | ||
847 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
848 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
849 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
850 | BinaryElementRelationLink.param1(link,source); | ||
851 | BinaryElementRelationLink.param2(link,target); | ||
852 | } | ||
853 | /** | ||
854 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
855 | */ | ||
856 | private pattern mayInRelationvertices_reference_Region( | ||
857 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
858 | source: DefinedElement, target:DefinedElement) | ||
859 | { | ||
860 | find interpretation(problem,interpretation); | ||
861 | // The two endpoint of the link have to exist | ||
862 | find mayExist(problem, interpretation, source); | ||
863 | find mayExist(problem, interpretation, target); | ||
864 | // Type consistency | ||
865 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
866 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
867 | // The reference is containment, then a new reference cannot be create if: | ||
868 | // 1. Multiple parents | ||
869 | neg find mustContains4(problem,interpretation,_,target); | ||
870 | // 2. Circle in the containment hierarchy | ||
871 | neg find mustTransitiveContains(source,target); | ||
872 | } or { | ||
873 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
874 | } | ||
875 | /** | ||
876 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
877 | */ | ||
878 | private pattern mustInRelationtarget_reference_Transition( | ||
879 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
880 | source: DefinedElement, target:DefinedElement) | ||
881 | { | ||
882 | find interpretation(problem,interpretation); | ||
883 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
884 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
885 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
886 | BinaryElementRelationLink.param1(link,source); | ||
887 | BinaryElementRelationLink.param2(link,target); | ||
888 | } | ||
889 | /** | ||
890 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
891 | */ | ||
892 | private pattern mayInRelationtarget_reference_Transition( | ||
893 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
894 | source: DefinedElement, target:DefinedElement) | ||
895 | { | ||
896 | find interpretation(problem,interpretation); | ||
897 | // The two endpoint of the link have to exist | ||
898 | find mayExist(problem, interpretation, source); | ||
899 | find mayExist(problem, interpretation, target); | ||
900 | // Type consistency | ||
901 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
902 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
903 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
904 | // the upper bound of the multiplicity should be considered. | ||
905 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
906 | check(numberOfExistingReferences < 1); | ||
907 | } or { | ||
908 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
909 | } | ||
910 | /** | ||
911 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
912 | */ | ||
913 | private pattern mustInRelationsource_reference_Transition( | ||
914 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
915 | source: DefinedElement, target:DefinedElement) | ||
916 | { | ||
917 | find interpretation(problem,interpretation); | ||
918 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
919 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
920 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
921 | BinaryElementRelationLink.param1(link,source); | ||
922 | BinaryElementRelationLink.param2(link,target); | ||
923 | } | ||
924 | /** | ||
925 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
926 | */ | ||
927 | private pattern mayInRelationsource_reference_Transition( | ||
928 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
929 | source: DefinedElement, target:DefinedElement) | ||
930 | { | ||
931 | find interpretation(problem,interpretation); | ||
932 | // The two endpoint of the link have to exist | ||
933 | find mayExist(problem, interpretation, source); | ||
934 | find mayExist(problem, interpretation, target); | ||
935 | // Type consistency | ||
936 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
937 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
938 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
939 | // the upper bound of the multiplicity should be considered. | ||
940 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
941 | check(numberOfExistingReferences < 1); | ||
942 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
943 | // 1. Multiple parents | ||
944 | neg find mustContains4(problem,interpretation,source,_); | ||
945 | // 2. Circle in the containment hierarchy | ||
946 | neg find mustTransitiveContains(source,target); | ||
947 | } or { | ||
948 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
949 | } | ||
950 | /** | ||
951 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
952 | */ | ||
953 | private pattern mustInRelationregions_reference_CompositeElement( | ||
954 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
955 | source: DefinedElement, target:DefinedElement) | ||
956 | { | ||
957 | find interpretation(problem,interpretation); | ||
958 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
959 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
960 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
961 | BinaryElementRelationLink.param1(link,source); | ||
962 | BinaryElementRelationLink.param2(link,target); | ||
963 | } | ||
964 | /** | ||
965 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
966 | */ | ||
967 | private pattern mayInRelationregions_reference_CompositeElement( | ||
968 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
969 | source: DefinedElement, target:DefinedElement) | ||
970 | { | ||
971 | find interpretation(problem,interpretation); | ||
972 | // The two endpoint of the link have to exist | ||
973 | find mayExist(problem, interpretation, source); | ||
974 | find mayExist(problem, interpretation, target); | ||
975 | // Type consistency | ||
976 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
977 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
978 | // The reference is containment, then a new reference cannot be create if: | ||
979 | // 1. Multiple parents | ||
980 | neg find mustContains4(problem,interpretation,_,target); | ||
981 | // 2. Circle in the containment hierarchy | ||
982 | neg find mustTransitiveContains(source,target); | ||
983 | } or { | ||
984 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
985 | } | ||
986 | |||
987 | ////////// | ||
988 | // 1.3 Relation Definition Indexers | ||
989 | ////////// | ||
990 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
991 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
992 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
993 | var_r1, var_e1) | ||
994 | { | ||
995 | find interpretation(problem,interpretation); | ||
996 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
997 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
998 | // r1 is exported | ||
999 | // e1 is exported | ||
1000 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1001 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
1002 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1003 | var_virtual0 == var_e1; | ||
1004 | } | ||
1005 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
1006 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1007 | var_r1, var_e1) | ||
1008 | { | ||
1009 | find interpretation(problem,interpretation); | ||
1010 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1011 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
1012 | // r1 is exported | ||
1013 | // e1 is exported | ||
1014 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1015 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
1016 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1017 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
1018 | } | ||
1019 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
1020 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1021 | var_r1, var_e1) | ||
1022 | { | ||
1023 | find interpretation(problem,interpretation); | ||
1024 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1025 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
1026 | // r1 is exported | ||
1027 | // e1 is exported | ||
1028 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1029 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
1030 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1031 | var_virtual0 == var_e1; | ||
1032 | } | ||
1033 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
1034 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
1035 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1036 | var_r1) | ||
1037 | { | ||
1038 | find interpretation(problem,interpretation); | ||
1039 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1040 | // r1 is exported | ||
1041 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
1042 | } | ||
1043 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
1044 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1045 | var_r1) | ||
1046 | { | ||
1047 | find interpretation(problem,interpretation); | ||
1048 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1049 | // r1 is exported | ||
1050 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
1051 | } | ||
1052 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
1053 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1054 | var_r1) | ||
1055 | { | ||
1056 | find interpretation(problem,interpretation); | ||
1057 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
1058 | // r1 is exported | ||
1059 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
1060 | } | ||
1061 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
1062 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
1063 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1064 | var_r) | ||
1065 | { | ||
1066 | find interpretation(problem,interpretation); | ||
1067 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1068 | // r is exported | ||
1069 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
1070 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
1071 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
1072 | } | ||
1073 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
1074 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1075 | var_r) | ||
1076 | { | ||
1077 | find interpretation(problem,interpretation); | ||
1078 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
1079 | // r is exported | ||
1080 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
1081 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
1082 | var_e1 != var_e2; | ||
1083 | } | ||
1084 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
1085 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1086 | var_r) | ||
1087 | { | ||
1088 | find interpretation(problem,interpretation); | ||
1089 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1090 | // r is exported | ||
1091 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
1092 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
1093 | var_e1 != var_e2; | ||
1094 | } | ||
1095 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
1096 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
1097 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1098 | var_t, var_src, var_trg) | ||
1099 | { | ||
1100 | find interpretation(problem,interpretation); | ||
1101 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1102 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
1103 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
1104 | // t is exported | ||
1105 | // src is exported | ||
1106 | // trg is exported | ||
1107 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1108 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
1109 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1110 | var_virtual0 == var_src; | ||
1111 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1112 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
1113 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1114 | var_virtual1 == var_trg; | ||
1115 | } | ||
1116 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
1117 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1118 | var_t, var_src, var_trg) | ||
1119 | { | ||
1120 | find interpretation(problem,interpretation); | ||
1121 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
1122 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
1123 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
1124 | // t is exported | ||
1125 | // src is exported | ||
1126 | // trg is exported | ||
1127 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
1128 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
1129 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1130 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
1131 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
1132 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
1133 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1134 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
1135 | } | ||
1136 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
1137 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1138 | var_t, var_src, var_trg) | ||
1139 | { | ||
1140 | find interpretation(problem,interpretation); | ||
1141 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1142 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
1143 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
1144 | // t is exported | ||
1145 | // src is exported | ||
1146 | // trg is exported | ||
1147 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1148 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
1149 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1150 | var_virtual0 == var_src; | ||
1151 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1152 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
1153 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1154 | var_virtual1 == var_trg; | ||
1155 | } | ||
1156 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
1157 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
1158 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1159 | var_t, var_e) | ||
1160 | { | ||
1161 | find interpretation(problem,interpretation); | ||
1162 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1163 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1164 | // t is exported | ||
1165 | // e is exported | ||
1166 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
1167 | } | ||
1168 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
1169 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1170 | var_t, var_e) | ||
1171 | { | ||
1172 | find interpretation(problem,interpretation); | ||
1173 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
1174 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
1175 | // t is exported | ||
1176 | // e is exported | ||
1177 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
1178 | } | ||
1179 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
1180 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1181 | var_t, var_e) | ||
1182 | { | ||
1183 | find interpretation(problem,interpretation); | ||
1184 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1185 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1186 | // t is exported | ||
1187 | // e is exported | ||
1188 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
1189 | } | ||
1190 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
1191 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
1192 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1193 | var_e) | ||
1194 | { | ||
1195 | find interpretation(problem,interpretation); | ||
1196 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1197 | // e is exported | ||
1198 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
1199 | } | ||
1200 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
1201 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1202 | var_e) | ||
1203 | { | ||
1204 | find interpretation(problem,interpretation); | ||
1205 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
1206 | // e is exported | ||
1207 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
1208 | } | ||
1209 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
1210 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1211 | var_e) | ||
1212 | { | ||
1213 | find interpretation(problem,interpretation); | ||
1214 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1215 | // e is exported | ||
1216 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
1217 | } | ||
1218 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
1219 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
1220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1221 | var_e, var_t1, var_t2) | ||
1222 | { | ||
1223 | find interpretation(problem,interpretation); | ||
1224 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1225 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
1226 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
1227 | // e is exported | ||
1228 | // t1 is exported | ||
1229 | // t2 is exported | ||
1230 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1231 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
1232 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1233 | var_virtual0 == var_t1; | ||
1234 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1235 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
1236 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
1237 | var_virtual1 == var_t2; | ||
1238 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
1239 | } | ||
1240 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
1241 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1242 | var_e, var_t1, var_t2) | ||
1243 | { | ||
1244 | find interpretation(problem,interpretation); | ||
1245 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
1246 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
1247 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
1248 | // e is exported | ||
1249 | // t1 is exported | ||
1250 | // t2 is exported | ||
1251 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
1252 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
1253 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1254 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
1255 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
1256 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
1257 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
1258 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
1259 | var_t1 != var_t2; | ||
1260 | } | ||
1261 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
1262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1263 | var_e, var_t1, var_t2) | ||
1264 | { | ||
1265 | find interpretation(problem,interpretation); | ||
1266 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1267 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
1268 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
1269 | // e is exported | ||
1270 | // t1 is exported | ||
1271 | // t2 is exported | ||
1272 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1273 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
1274 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1275 | var_virtual0 == var_t1; | ||
1276 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
1277 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
1278 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
1279 | var_virtual1 == var_t2; | ||
1280 | var_t1 != var_t2; | ||
1281 | } | ||
1282 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
1283 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
1284 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1285 | var_t, var_e) | ||
1286 | { | ||
1287 | find interpretation(problem,interpretation); | ||
1288 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1289 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
1290 | // t is exported | ||
1291 | // e is exported | ||
1292 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
1293 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
1294 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1295 | var_virtual0 == var_t; | ||
1296 | } | ||
1297 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
1298 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1299 | var_t, var_e) | ||
1300 | { | ||
1301 | find interpretation(problem,interpretation); | ||
1302 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
1303 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
1304 | // t is exported | ||
1305 | // e is exported | ||
1306 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
1307 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
1308 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1309 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
1310 | } | ||
1311 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
1312 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1313 | var_t, var_e) | ||
1314 | { | ||
1315 | find interpretation(problem,interpretation); | ||
1316 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1317 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
1318 | // t is exported | ||
1319 | // e is exported | ||
1320 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
1321 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
1322 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1323 | var_virtual0 == var_t; | ||
1324 | } | ||
1325 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
1326 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
1327 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1328 | var_t, var_f) | ||
1329 | { | ||
1330 | find interpretation(problem,interpretation); | ||
1331 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1332 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
1333 | // t is exported | ||
1334 | // f is exported | ||
1335 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
1336 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
1337 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1338 | var_virtual0 == var_t; | ||
1339 | } | ||
1340 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
1341 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1342 | var_t, var_f) | ||
1343 | { | ||
1344 | find interpretation(problem,interpretation); | ||
1345 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
1346 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
1347 | // t is exported | ||
1348 | // f is exported | ||
1349 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
1350 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
1351 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1352 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
1353 | } | ||
1354 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
1355 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1356 | var_t, var_f) | ||
1357 | { | ||
1358 | find interpretation(problem,interpretation); | ||
1359 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
1360 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
1361 | // t is exported | ||
1362 | // f is exported | ||
1363 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
1364 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
1365 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
1366 | var_virtual0 == var_t; | ||
1367 | } | ||
1368 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
1369 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
1370 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1371 | var_region) | ||
1372 | { | ||
1373 | find interpretation(problem,interpretation); | ||
1374 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
1375 | // region is exported | ||
1376 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
1377 | } | ||
1378 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
1379 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1380 | var_region) | ||
1381 | { | ||
1382 | find interpretation(problem,interpretation); | ||
1383 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
1384 | // region is exported | ||
1385 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
1386 | } | ||
1387 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
1388 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1389 | var_region) | ||
1390 | { | ||
1391 | find interpretation(problem,interpretation); | ||
1392 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
1393 | // region is exported | ||
1394 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
1395 | } | ||
1396 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
1397 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
1398 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1399 | var_region, var_state) | ||
1400 | { | ||
1401 | find interpretation(problem,interpretation); | ||
1402 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
1403 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
1404 | // region is exported | ||
1405 | // state is exported | ||
1406 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
1407 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
1408 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1409 | var_virtual0 == var_state; | ||
1410 | } | ||
1411 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
1412 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1413 | var_region, var_state) | ||
1414 | { | ||
1415 | find interpretation(problem,interpretation); | ||
1416 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
1417 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
1418 | // region is exported | ||
1419 | // state is exported | ||
1420 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
1421 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
1422 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1423 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
1424 | } | ||
1425 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
1426 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1427 | var_region, var_state) | ||
1428 | { | ||
1429 | find interpretation(problem,interpretation); | ||
1430 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
1431 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
1432 | // region is exported | ||
1433 | // state is exported | ||
1434 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
1435 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
1436 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1437 | var_virtual0 == var_state; | ||
1438 | } | ||
1439 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
1440 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
1441 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1442 | var_c) | ||
1443 | { | ||
1444 | find interpretation(problem,interpretation); | ||
1445 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
1446 | // c is exported | ||
1447 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
1448 | } | ||
1449 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
1450 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1451 | var_c) | ||
1452 | { | ||
1453 | find interpretation(problem,interpretation); | ||
1454 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
1455 | // c is exported | ||
1456 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
1457 | } | ||
1458 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
1459 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1460 | var_c) | ||
1461 | { | ||
1462 | find interpretation(problem,interpretation); | ||
1463 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
1464 | // c is exported | ||
1465 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
1466 | } | ||
1467 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
1468 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
1469 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1470 | var_c) | ||
1471 | { | ||
1472 | find interpretation(problem,interpretation); | ||
1473 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
1474 | // c is exported | ||
1475 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
1476 | } | ||
1477 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
1478 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1479 | var_c) | ||
1480 | { | ||
1481 | find interpretation(problem,interpretation); | ||
1482 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
1483 | // c is exported | ||
1484 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
1485 | } | ||
1486 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
1487 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1488 | var_c) | ||
1489 | { | ||
1490 | find interpretation(problem,interpretation); | ||
1491 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
1492 | // c is exported | ||
1493 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
1494 | } | ||
1495 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
1496 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
1497 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1498 | var_s) | ||
1499 | { | ||
1500 | find interpretation(problem,interpretation); | ||
1501 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1502 | // s is exported | ||
1503 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
1504 | } | ||
1505 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
1506 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1507 | var_s) | ||
1508 | { | ||
1509 | find interpretation(problem,interpretation); | ||
1510 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1511 | // s is exported | ||
1512 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
1513 | } | ||
1514 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
1515 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1516 | var_s) | ||
1517 | { | ||
1518 | find interpretation(problem,interpretation); | ||
1519 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1520 | // s is exported | ||
1521 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
1522 | } | ||
1523 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
1524 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
1525 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1526 | var_s) | ||
1527 | { | ||
1528 | find interpretation(problem,interpretation); | ||
1529 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1530 | // s is exported | ||
1531 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
1532 | } | ||
1533 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
1534 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1535 | var_s) | ||
1536 | { | ||
1537 | find interpretation(problem,interpretation); | ||
1538 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1539 | // s is exported | ||
1540 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
1541 | } | ||
1542 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
1543 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1544 | var_s) | ||
1545 | { | ||
1546 | find interpretation(problem,interpretation); | ||
1547 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1548 | // s is exported | ||
1549 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
1550 | } | ||
1551 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
1552 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
1553 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1554 | var_s, var_v1, var_v2) | ||
1555 | { | ||
1556 | find interpretation(problem,interpretation); | ||
1557 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1558 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1559 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1560 | // s is exported | ||
1561 | // v1 is exported | ||
1562 | // v2 is exported | ||
1563 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
1564 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
1565 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
1566 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1567 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
1568 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1569 | var_virtual0 == var_v1; | ||
1570 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1571 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
1572 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1573 | var_virtual1 == var_v2; | ||
1574 | }or{ | ||
1575 | find interpretation(problem,interpretation); | ||
1576 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1577 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1578 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1579 | // s is exported | ||
1580 | // v1 is exported | ||
1581 | // v2 is exported | ||
1582 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
1583 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
1584 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
1585 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1586 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
1587 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1588 | var_virtual0 == var_v1; | ||
1589 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1590 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
1591 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1592 | var_virtual1 == var_v2; | ||
1593 | } | ||
1594 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
1595 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1596 | var_s, var_v1, var_v2) | ||
1597 | { | ||
1598 | find interpretation(problem,interpretation); | ||
1599 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1600 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1601 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1602 | // s is exported | ||
1603 | // v1 is exported | ||
1604 | // v2 is exported | ||
1605 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
1606 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
1607 | var_t1 != var_t2; | ||
1608 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
1609 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
1610 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1611 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
1612 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
1613 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
1614 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1615 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
1616 | }or{ | ||
1617 | find interpretation(problem,interpretation); | ||
1618 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1619 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1620 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1621 | // s is exported | ||
1622 | // v1 is exported | ||
1623 | // v2 is exported | ||
1624 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
1625 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
1626 | var_t1 != var_t2; | ||
1627 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
1628 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
1629 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1630 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
1631 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
1632 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
1633 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1634 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
1635 | } | ||
1636 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
1637 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1638 | var_s, var_v1, var_v2) | ||
1639 | { | ||
1640 | find interpretation(problem,interpretation); | ||
1641 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1642 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1643 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1644 | // s is exported | ||
1645 | // v1 is exported | ||
1646 | // v2 is exported | ||
1647 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
1648 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
1649 | var_t1 != var_t2; | ||
1650 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1651 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
1652 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1653 | var_virtual0 == var_v1; | ||
1654 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1655 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
1656 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1657 | var_virtual1 == var_v2; | ||
1658 | }or{ | ||
1659 | find interpretation(problem,interpretation); | ||
1660 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1661 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1662 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1663 | // s is exported | ||
1664 | // v1 is exported | ||
1665 | // v2 is exported | ||
1666 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
1667 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
1668 | var_t1 != var_t2; | ||
1669 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1670 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
1671 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
1672 | var_virtual0 == var_v1; | ||
1673 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
1674 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
1675 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1676 | var_virtual1 == var_v2; | ||
1677 | } | ||
1678 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
1679 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
1680 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1681 | var_s) | ||
1682 | { | ||
1683 | find interpretation(problem,interpretation); | ||
1684 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1685 | // s is exported | ||
1686 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
1687 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
1688 | } | ||
1689 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
1690 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1691 | var_s) | ||
1692 | { | ||
1693 | find interpretation(problem,interpretation); | ||
1694 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1695 | // s is exported | ||
1696 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
1697 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
1698 | } | ||
1699 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
1700 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1701 | var_s) | ||
1702 | { | ||
1703 | find interpretation(problem,interpretation); | ||
1704 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1705 | // s is exported | ||
1706 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
1707 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
1708 | } | ||
1709 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
1710 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
1711 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1712 | var_v) | ||
1713 | { | ||
1714 | find interpretation(problem,interpretation); | ||
1715 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
1716 | // v is exported | ||
1717 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
1718 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
1719 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
1720 | } | ||
1721 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
1722 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1723 | var_v) | ||
1724 | { | ||
1725 | find interpretation(problem,interpretation); | ||
1726 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
1727 | // v is exported | ||
1728 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
1729 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
1730 | var_trg1 != var_trg2; | ||
1731 | } | ||
1732 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
1733 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1734 | var_v) | ||
1735 | { | ||
1736 | find interpretation(problem,interpretation); | ||
1737 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
1738 | // v is exported | ||
1739 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
1740 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
1741 | var_trg1 != var_trg2; | ||
1742 | } | ||
1743 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
1744 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
1745 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1746 | var_v) | ||
1747 | { | ||
1748 | find interpretation(problem,interpretation); | ||
1749 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
1750 | // v is exported | ||
1751 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
1752 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
1753 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
1754 | } | ||
1755 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
1756 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1757 | var_v) | ||
1758 | { | ||
1759 | find interpretation(problem,interpretation); | ||
1760 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
1761 | // v is exported | ||
1762 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
1763 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
1764 | var_src1 != var_src2; | ||
1765 | } | ||
1766 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
1767 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1768 | var_v) | ||
1769 | { | ||
1770 | find interpretation(problem,interpretation); | ||
1771 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
1772 | // v is exported | ||
1773 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
1774 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
1775 | var_src1 != var_src2; | ||
1776 | } | ||
1777 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
1778 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
1779 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1780 | var_s, var_v1, var_v2) | ||
1781 | { | ||
1782 | find interpretation(problem,interpretation); | ||
1783 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1784 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1785 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1786 | // s is exported | ||
1787 | // v1 is exported | ||
1788 | // v2 is exported | ||
1789 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
1790 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
1791 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
1792 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
1793 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1794 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1795 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1796 | var_virtual1 == var_v1; | ||
1797 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
1798 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
1799 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
1800 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
1801 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
1802 | var_virtual3 == var_v2; | ||
1803 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
1804 | }or{ | ||
1805 | find interpretation(problem,interpretation); | ||
1806 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1807 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1808 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1809 | // s is exported | ||
1810 | // v1 is exported | ||
1811 | // v2 is exported | ||
1812 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
1813 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
1814 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
1815 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
1816 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1817 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1818 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1819 | var_virtual1 == var_v1; | ||
1820 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
1821 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
1822 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
1823 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
1824 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
1825 | var_virtual3 == var_v2; | ||
1826 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
1827 | } | ||
1828 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
1829 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1830 | var_s, var_v1, var_v2) | ||
1831 | { | ||
1832 | find interpretation(problem,interpretation); | ||
1833 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1834 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1835 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1836 | // s is exported | ||
1837 | // v1 is exported | ||
1838 | // v2 is exported | ||
1839 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
1840 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
1841 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
1842 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
1843 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1844 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1845 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1846 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
1847 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
1848 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
1849 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
1850 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
1851 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
1852 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
1853 | var_r1 != var_r2; | ||
1854 | }or{ | ||
1855 | find interpretation(problem,interpretation); | ||
1856 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1857 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1858 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1859 | // s is exported | ||
1860 | // v1 is exported | ||
1861 | // v2 is exported | ||
1862 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
1863 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
1864 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
1865 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
1866 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1867 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1868 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1869 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
1870 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
1871 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
1872 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
1873 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
1874 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
1875 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
1876 | var_r1 != var_r2; | ||
1877 | } | ||
1878 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
1879 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1880 | var_s, var_v1, var_v2) | ||
1881 | { | ||
1882 | find interpretation(problem,interpretation); | ||
1883 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1884 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1885 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1886 | // s is exported | ||
1887 | // v1 is exported | ||
1888 | // v2 is exported | ||
1889 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
1890 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
1891 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
1892 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
1893 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1894 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1895 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1896 | var_virtual1 == var_v1; | ||
1897 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
1898 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
1899 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
1900 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
1901 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
1902 | var_virtual3 == var_v2; | ||
1903 | var_r1 != var_r2; | ||
1904 | }or{ | ||
1905 | find interpretation(problem,interpretation); | ||
1906 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1907 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
1908 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
1909 | // s is exported | ||
1910 | // v1 is exported | ||
1911 | // v2 is exported | ||
1912 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
1913 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
1914 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
1915 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
1916 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1917 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1918 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1919 | var_virtual1 == var_v1; | ||
1920 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
1921 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
1922 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
1923 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
1924 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
1925 | var_virtual3 == var_v2; | ||
1926 | var_r1 != var_r2; | ||
1927 | } | ||
1928 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
1929 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
1930 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1931 | var_parent, var_child) | ||
1932 | { | ||
1933 | find interpretation(problem,interpretation); | ||
1934 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
1935 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
1936 | // parent is exported | ||
1937 | // child is exported | ||
1938 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
1939 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
1940 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1941 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1942 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1943 | var_virtual1 == var_child; | ||
1944 | } | ||
1945 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
1946 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1947 | var_parent, var_child) | ||
1948 | { | ||
1949 | find interpretation(problem,interpretation); | ||
1950 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
1951 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
1952 | // parent is exported | ||
1953 | // child is exported | ||
1954 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
1955 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
1956 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1957 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1958 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1959 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
1960 | } | ||
1961 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
1962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1963 | var_parent, var_child) | ||
1964 | { | ||
1965 | find interpretation(problem,interpretation); | ||
1966 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
1967 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
1968 | // parent is exported | ||
1969 | // child is exported | ||
1970 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
1971 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
1972 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
1973 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
1974 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
1975 | var_virtual1 == var_child; | ||
1976 | } | ||
1977 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
1978 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
1979 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1980 | var_s, var_v) | ||
1981 | { | ||
1982 | find interpretation(problem,interpretation); | ||
1983 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1984 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
1985 | // s is exported | ||
1986 | // v is exported | ||
1987 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
1988 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
1989 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
1990 | }or{ | ||
1991 | find interpretation(problem,interpretation); | ||
1992 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
1993 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
1994 | // s is exported | ||
1995 | // v is exported | ||
1996 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
1997 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
1998 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
1999 | } | ||
2000 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
2001 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2002 | var_s, var_v) | ||
2003 | { | ||
2004 | find interpretation(problem,interpretation); | ||
2005 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2006 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
2007 | // s is exported | ||
2008 | // v is exported | ||
2009 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
2010 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
2011 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
2012 | }or{ | ||
2013 | find interpretation(problem,interpretation); | ||
2014 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2015 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
2016 | // s is exported | ||
2017 | // v is exported | ||
2018 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
2019 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
2020 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
2021 | } | ||
2022 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
2023 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2024 | var_s, var_v) | ||
2025 | { | ||
2026 | find interpretation(problem,interpretation); | ||
2027 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2028 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
2029 | // s is exported | ||
2030 | // v is exported | ||
2031 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
2032 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
2033 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
2034 | }or{ | ||
2035 | find interpretation(problem,interpretation); | ||
2036 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2037 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
2038 | // s is exported | ||
2039 | // v is exported | ||
2040 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
2041 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
2042 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
2043 | } | ||
2044 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
2045 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
2046 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2047 | var_composite) | ||
2048 | { | ||
2049 | find interpretation(problem,interpretation); | ||
2050 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2051 | // composite is exported | ||
2052 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2053 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
2054 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
2055 | var_virtual0 == var_region1; | ||
2056 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2057 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
2058 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
2059 | var_virtual1 == var_region2; | ||
2060 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
2061 | } | ||
2062 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
2063 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2064 | var_composite) | ||
2065 | { | ||
2066 | find interpretation(problem,interpretation); | ||
2067 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2068 | // composite is exported | ||
2069 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2070 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
2071 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
2072 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
2073 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2074 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
2075 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
2076 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
2077 | var_region1 != var_region2; | ||
2078 | } | ||
2079 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
2080 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2081 | var_composite) | ||
2082 | { | ||
2083 | find interpretation(problem,interpretation); | ||
2084 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2085 | // composite is exported | ||
2086 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2087 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
2088 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
2089 | var_virtual0 == var_region1; | ||
2090 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
2091 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
2092 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
2093 | var_virtual1 == var_region2; | ||
2094 | var_region1 != var_region2; | ||
2095 | } | ||
2096 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
2097 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
2098 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2099 | var_s) | ||
2100 | { | ||
2101 | find interpretation(problem,interpretation); | ||
2102 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2103 | // s is exported | ||
2104 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
2105 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
2106 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
2107 | var_virtual0 == var_s; | ||
2108 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
2109 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
2110 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
2111 | var_virtual1 == var_s; | ||
2112 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
2113 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
2114 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
2115 | var_virtual2 == var_s; | ||
2116 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
2117 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
2118 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
2119 | }or{ | ||
2120 | find interpretation(problem,interpretation); | ||
2121 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2122 | // s is exported | ||
2123 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
2124 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
2125 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
2126 | var_virtual0 == var_s; | ||
2127 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
2128 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
2129 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
2130 | var_virtual1 == var_s; | ||
2131 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
2132 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
2133 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
2134 | var_virtual2 == var_s; | ||
2135 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
2136 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
2137 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
2138 | } | ||
2139 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
2140 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2141 | var_s) | ||
2142 | { | ||
2143 | find interpretation(problem,interpretation); | ||
2144 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2145 | // s is exported | ||
2146 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
2147 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
2148 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
2149 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
2150 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
2151 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
2152 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
2153 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
2154 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
2155 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
2156 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
2157 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
2158 | var_t1 != var_t2; | ||
2159 | var_t2 != var_t3; | ||
2160 | var_t1 != var_t3; | ||
2161 | }or{ | ||
2162 | find interpretation(problem,interpretation); | ||
2163 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2164 | // s is exported | ||
2165 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
2166 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
2167 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
2168 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
2169 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
2170 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
2171 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
2172 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
2173 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
2174 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
2175 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
2176 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
2177 | var_t1 != var_t2; | ||
2178 | var_t2 != var_t3; | ||
2179 | var_t1 != var_t3; | ||
2180 | } | ||
2181 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
2182 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2183 | var_s) | ||
2184 | { | ||
2185 | find interpretation(problem,interpretation); | ||
2186 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2187 | // s is exported | ||
2188 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
2189 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
2190 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
2191 | var_virtual0 == var_s; | ||
2192 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
2193 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
2194 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
2195 | var_virtual1 == var_s; | ||
2196 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
2197 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
2198 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
2199 | var_virtual2 == var_s; | ||
2200 | var_t1 != var_t2; | ||
2201 | var_t2 != var_t3; | ||
2202 | var_t1 != var_t3; | ||
2203 | }or{ | ||
2204 | find interpretation(problem,interpretation); | ||
2205 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
2206 | // s is exported | ||
2207 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
2208 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
2209 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
2210 | var_virtual0 == var_s; | ||
2211 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
2212 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
2213 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
2214 | var_virtual1 == var_s; | ||
2215 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
2216 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
2217 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
2218 | var_virtual2 == var_s; | ||
2219 | var_t1 != var_t2; | ||
2220 | var_t2 != var_t3; | ||
2221 | var_t1 != var_t3; | ||
2222 | } | ||
2223 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
2224 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
2225 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2226 | var_s1, var_s2) | ||
2227 | { | ||
2228 | find interpretation(problem,interpretation); | ||
2229 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
2230 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
2231 | // s1 is exported | ||
2232 | // s2 is exported | ||
2233 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
2234 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
2235 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
2236 | } | ||
2237 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
2238 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2239 | var_s1, var_s2) | ||
2240 | { | ||
2241 | find interpretation(problem,interpretation); | ||
2242 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
2243 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
2244 | // s1 is exported | ||
2245 | // s2 is exported | ||
2246 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
2247 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
2248 | var_s1 != var_s2; | ||
2249 | } | ||
2250 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
2251 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2252 | var_s1, var_s2) | ||
2253 | { | ||
2254 | find interpretation(problem,interpretation); | ||
2255 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
2256 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
2257 | // s1 is exported | ||
2258 | // s2 is exported | ||
2259 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
2260 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
2261 | var_s1 != var_s2; | ||
2262 | } | ||
2263 | |||
2264 | ////////// | ||
2265 | // 1.4 Containment Indexer | ||
2266 | ////////// | ||
2267 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
2268 | find mustContains4(_,_,source,target); | ||
2269 | } | ||
2270 | |||
2271 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2272 | source: DefinedElement, target: DefinedElement) | ||
2273 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
2274 | |||
2275 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
2276 | |||
2277 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
2278 | |||
2279 | private pattern mustTransitiveContains(source,target) { | ||
2280 | find mustContains2+(source,target); | ||
2281 | } | ||
2282 | |||
2283 | ////////// | ||
2284 | // 2. Invalidation Indexers | ||
2285 | ////////// | ||
2286 | // 2.1 Invalidated by WF Queries | ||
2287 | ////////// | ||
2288 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2289 | var_r1) | ||
2290 | { | ||
2291 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
2292 | } | ||
2293 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2294 | var_r) | ||
2295 | { | ||
2296 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
2297 | } | ||
2298 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2299 | var_t, var_e) | ||
2300 | { | ||
2301 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
2302 | } | ||
2303 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2304 | var_e) | ||
2305 | { | ||
2306 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
2307 | } | ||
2308 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2309 | var_e, var_t1, var_t2) | ||
2310 | { | ||
2311 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
2312 | } | ||
2313 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2314 | var_t, var_e) | ||
2315 | { | ||
2316 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
2317 | } | ||
2318 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2319 | var_t, var_f) | ||
2320 | { | ||
2321 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
2322 | } | ||
2323 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2324 | var_region) | ||
2325 | { | ||
2326 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
2327 | } | ||
2328 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2329 | var_c) | ||
2330 | { | ||
2331 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
2332 | } | ||
2333 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2334 | var_c) | ||
2335 | { | ||
2336 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
2337 | } | ||
2338 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2339 | var_s) | ||
2340 | { | ||
2341 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
2342 | } | ||
2343 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2344 | var_s) | ||
2345 | { | ||
2346 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
2347 | } | ||
2348 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2349 | var_s, var_v1, var_v2) | ||
2350 | { | ||
2351 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
2352 | } | ||
2353 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2354 | var_s) | ||
2355 | { | ||
2356 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
2357 | } | ||
2358 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2359 | var_s, var_v1, var_v2) | ||
2360 | { | ||
2361 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
2362 | } | ||
2363 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2364 | var_s, var_v) | ||
2365 | { | ||
2366 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
2367 | } | ||
2368 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2369 | var_s) | ||
2370 | { | ||
2371 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
2372 | } | ||
2373 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2374 | var_s1, var_s2) | ||
2375 | { | ||
2376 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
2377 | } | ||
2378 | |||
2379 | ////////// | ||
2380 | // 3. Unfinishedness Indexers | ||
2381 | ////////// | ||
2382 | // 3.1 Unfinishedness Measured by Multiplicity | ||
2383 | ////////// | ||
2384 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
2385 | find interpretation(problem,interpretation); | ||
2386 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2387 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
2388 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
2389 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
2390 | check(numberOfExistingReferences < 1); | ||
2391 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
2392 | } | ||
2393 | |||
2394 | ////////// | ||
2395 | // 3.2 Unfinishedness Measured by WF Queries | ||
2396 | ////////// | ||
2397 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2398 | var_r1) | ||
2399 | { | ||
2400 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
2401 | } | ||
2402 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2403 | var_r) | ||
2404 | { | ||
2405 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
2406 | } | ||
2407 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2408 | var_t, var_e) | ||
2409 | { | ||
2410 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
2411 | } | ||
2412 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2413 | var_e) | ||
2414 | { | ||
2415 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
2416 | } | ||
2417 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2418 | var_e, var_t1, var_t2) | ||
2419 | { | ||
2420 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
2421 | } | ||
2422 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2423 | var_t, var_e) | ||
2424 | { | ||
2425 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
2426 | } | ||
2427 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2428 | var_t, var_f) | ||
2429 | { | ||
2430 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
2431 | } | ||
2432 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2433 | var_region) | ||
2434 | { | ||
2435 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
2436 | } | ||
2437 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2438 | var_c) | ||
2439 | { | ||
2440 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
2441 | } | ||
2442 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2443 | var_c) | ||
2444 | { | ||
2445 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
2446 | } | ||
2447 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2448 | var_s) | ||
2449 | { | ||
2450 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
2451 | } | ||
2452 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2453 | var_s) | ||
2454 | { | ||
2455 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
2456 | } | ||
2457 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2458 | var_s, var_v1, var_v2) | ||
2459 | { | ||
2460 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
2461 | } | ||
2462 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2463 | var_s) | ||
2464 | { | ||
2465 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
2466 | } | ||
2467 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2468 | var_s, var_v1, var_v2) | ||
2469 | { | ||
2470 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
2471 | } | ||
2472 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2473 | var_s, var_v) | ||
2474 | { | ||
2475 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
2476 | } | ||
2477 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2478 | var_s) | ||
2479 | { | ||
2480 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
2481 | } | ||
2482 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2483 | var_s1, var_s2) | ||
2484 | { | ||
2485 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
2486 | } | ||
2487 | |||
2488 | ////////// | ||
2489 | // 4. Refinement Indexers | ||
2490 | ////////// | ||
2491 | // 4.1 Object constructors | ||
2492 | ////////// | ||
2493 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
2494 | { | ||
2495 | find interpretation(problem,interpretation); | ||
2496 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
2497 | find mustExist(problem, interpretation, root); | ||
2498 | }or{ | ||
2499 | find interpretation(problem,interpretation); | ||
2500 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
2501 | find mustExist(problem, interpretation, root); | ||
2502 | }or{ | ||
2503 | find interpretation(problem,interpretation); | ||
2504 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
2505 | find mustExist(problem, interpretation, root); | ||
2506 | }or{ | ||
2507 | find interpretation(problem,interpretation); | ||
2508 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
2509 | find mustExist(problem, interpretation, root); | ||
2510 | }or{ | ||
2511 | find interpretation(problem,interpretation); | ||
2512 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
2513 | find mustExist(problem, interpretation, root); | ||
2514 | }or{ | ||
2515 | find interpretation(problem,interpretation); | ||
2516 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
2517 | find mustExist(problem, interpretation, root); | ||
2518 | }or{ | ||
2519 | find interpretation(problem,interpretation); | ||
2520 | find mustInstanceOfState_class(problem,interpretation,root); | ||
2521 | find mustExist(problem, interpretation, root); | ||
2522 | }or{ | ||
2523 | find interpretation(problem,interpretation); | ||
2524 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
2525 | find mustExist(problem, interpretation, root); | ||
2526 | }or{ | ||
2527 | find interpretation(problem,interpretation); | ||
2528 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
2529 | find mustExist(problem, interpretation, root); | ||
2530 | }or{ | ||
2531 | find interpretation(problem,interpretation); | ||
2532 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
2533 | find mustExist(problem, interpretation, root); | ||
2534 | }or{ | ||
2535 | find interpretation(problem,interpretation); | ||
2536 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
2537 | find mustExist(problem, interpretation, root); | ||
2538 | }or{ | ||
2539 | find interpretation(problem,interpretation); | ||
2540 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
2541 | find mustExist(problem, interpretation, root); | ||
2542 | }or{ | ||
2543 | find interpretation(problem,interpretation); | ||
2544 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
2545 | find mustExist(problem, interpretation, root); | ||
2546 | }or{ | ||
2547 | find interpretation(problem,interpretation); | ||
2548 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
2549 | find mustExist(problem, interpretation, root); | ||
2550 | }or{ | ||
2551 | find interpretation(problem,interpretation); | ||
2552 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
2553 | find mustExist(problem, interpretation, root); | ||
2554 | }or{ | ||
2555 | find interpretation(problem,interpretation); | ||
2556 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
2557 | find mustExist(problem, interpretation, root); | ||
2558 | }or{ | ||
2559 | find interpretation(problem,interpretation); | ||
2560 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
2561 | find mustExist(problem, interpretation, root); | ||
2562 | } | ||
2563 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
2564 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2565 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2566 | container:DefinedElement) | ||
2567 | { | ||
2568 | find interpretation(problem,interpretation); | ||
2569 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2570 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
2571 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2572 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
2573 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
2574 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
2575 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
2576 | find mustExist(problem, interpretation, container); | ||
2577 | neg find mustExist(problem, interpretation, newObject); | ||
2578 | } | ||
2579 | pattern createObject_Choice_class( | ||
2580 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2581 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2582 | { | ||
2583 | find interpretation(problem,interpretation); | ||
2584 | neg find hasElementInContainment(problem,interpretation); | ||
2585 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2586 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
2587 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
2588 | find mayExist(problem, interpretation, newObject); | ||
2589 | neg find mustExist(problem, interpretation, newObject); | ||
2590 | } | ||
2591 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
2592 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2593 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2594 | container:DefinedElement) | ||
2595 | { | ||
2596 | find interpretation(problem,interpretation); | ||
2597 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2598 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
2599 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2600 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
2601 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
2602 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
2603 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
2604 | find mustExist(problem, interpretation, container); | ||
2605 | neg find mustExist(problem, interpretation, newObject); | ||
2606 | } | ||
2607 | pattern createObject_FinalState_class( | ||
2608 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2609 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2610 | { | ||
2611 | find interpretation(problem,interpretation); | ||
2612 | neg find hasElementInContainment(problem,interpretation); | ||
2613 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2614 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
2615 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
2616 | find mayExist(problem, interpretation, newObject); | ||
2617 | neg find mustExist(problem, interpretation, newObject); | ||
2618 | } | ||
2619 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
2620 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2621 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2622 | container:DefinedElement) | ||
2623 | { | ||
2624 | find interpretation(problem,interpretation); | ||
2625 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2626 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
2627 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2628 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
2629 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
2630 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
2631 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
2632 | find mustExist(problem, interpretation, container); | ||
2633 | neg find mustExist(problem, interpretation, newObject); | ||
2634 | } | ||
2635 | pattern createObject_Synchronization_class( | ||
2636 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2637 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2638 | { | ||
2639 | find interpretation(problem,interpretation); | ||
2640 | neg find hasElementInContainment(problem,interpretation); | ||
2641 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2642 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
2643 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
2644 | find mayExist(problem, interpretation, newObject); | ||
2645 | neg find mustExist(problem, interpretation, newObject); | ||
2646 | } | ||
2647 | pattern createObject_Statechart_class_UndefinedPart( | ||
2648 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2649 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2650 | { | ||
2651 | find interpretation(problem,interpretation); | ||
2652 | neg find hasElementInContainment(problem,interpretation); | ||
2653 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2654 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
2655 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
2656 | find mayExist(problem, interpretation, newObject); | ||
2657 | neg find mustExist(problem, interpretation, newObject); | ||
2658 | } | ||
2659 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
2660 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2661 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2662 | container:DefinedElement) | ||
2663 | { | ||
2664 | find interpretation(problem,interpretation); | ||
2665 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2666 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
2667 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2668 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
2669 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
2670 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
2671 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
2672 | find mustExist(problem, interpretation, container); | ||
2673 | neg find mustExist(problem, interpretation, newObject); | ||
2674 | } | ||
2675 | pattern createObject_Entry_class( | ||
2676 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2677 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2678 | { | ||
2679 | find interpretation(problem,interpretation); | ||
2680 | neg find hasElementInContainment(problem,interpretation); | ||
2681 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2682 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
2683 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
2684 | find mayExist(problem, interpretation, newObject); | ||
2685 | neg find mustExist(problem, interpretation, newObject); | ||
2686 | } | ||
2687 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
2688 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2689 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2690 | container:DefinedElement) | ||
2691 | { | ||
2692 | find interpretation(problem,interpretation); | ||
2693 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2694 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
2695 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2696 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
2697 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
2698 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
2699 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
2700 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
2701 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
2702 | find mustExist(problem, interpretation, container); | ||
2703 | neg find mustExist(problem, interpretation, newObject); | ||
2704 | } | ||
2705 | pattern createObject_Transition_class( | ||
2706 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2707 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2708 | { | ||
2709 | find interpretation(problem,interpretation); | ||
2710 | neg find hasElementInContainment(problem,interpretation); | ||
2711 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2712 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
2713 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
2714 | find mayExist(problem, interpretation, newObject); | ||
2715 | neg find mustExist(problem, interpretation, newObject); | ||
2716 | } | ||
2717 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
2718 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2719 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2720 | container:DefinedElement) | ||
2721 | { | ||
2722 | find interpretation(problem,interpretation); | ||
2723 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2724 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
2725 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2726 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
2727 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
2728 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
2729 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
2730 | find mustExist(problem, interpretation, container); | ||
2731 | neg find mustExist(problem, interpretation, newObject); | ||
2732 | } | ||
2733 | pattern createObject_Region_class( | ||
2734 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2735 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2736 | { | ||
2737 | find interpretation(problem,interpretation); | ||
2738 | neg find hasElementInContainment(problem,interpretation); | ||
2739 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2740 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
2741 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
2742 | find mayExist(problem, interpretation, newObject); | ||
2743 | neg find mustExist(problem, interpretation, newObject); | ||
2744 | } | ||
2745 | pattern createObject_State_class_by_vertices_reference_Region( | ||
2746 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2747 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2748 | container:DefinedElement) | ||
2749 | { | ||
2750 | find interpretation(problem,interpretation); | ||
2751 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2752 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
2753 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2754 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
2755 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
2756 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
2757 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
2758 | find mustExist(problem, interpretation, container); | ||
2759 | neg find mustExist(problem, interpretation, newObject); | ||
2760 | } | ||
2761 | pattern createObject_State_class( | ||
2762 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2763 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2764 | { | ||
2765 | find interpretation(problem,interpretation); | ||
2766 | neg find hasElementInContainment(problem,interpretation); | ||
2767 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2768 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
2769 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
2770 | find mayExist(problem, interpretation, newObject); | ||
2771 | neg find mustExist(problem, interpretation, newObject); | ||
2772 | } | ||
2773 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
2774 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2775 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2776 | container:DefinedElement) | ||
2777 | { | ||
2778 | find interpretation(problem,interpretation); | ||
2779 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2780 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
2781 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2782 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
2783 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
2784 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
2785 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
2786 | find mustExist(problem, interpretation, container); | ||
2787 | neg find mustExist(problem, interpretation, newObject); | ||
2788 | } | ||
2789 | pattern createObject_Exit_class( | ||
2790 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2791 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2792 | { | ||
2793 | find interpretation(problem,interpretation); | ||
2794 | neg find hasElementInContainment(problem,interpretation); | ||
2795 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2796 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
2797 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
2798 | find mayExist(problem, interpretation, newObject); | ||
2799 | neg find mustExist(problem, interpretation, newObject); | ||
2800 | } | ||
2801 | |||
2802 | ////////// | ||
2803 | // 4.2 Type refinement | ||
2804 | ////////// | ||
2805 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2806 | find interpretation(problem,interpretation); | ||
2807 | PartialInterpretation.newElements(interpretation,element); | ||
2808 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
2809 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
2810 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
2811 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
2812 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
2813 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
2814 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2815 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2816 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
2817 | } | ||
2818 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2819 | find interpretation(problem,interpretation); | ||
2820 | PartialInterpretation.newElements(interpretation,element); | ||
2821 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
2822 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
2823 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
2824 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
2825 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2826 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2827 | } | ||
2828 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2829 | find interpretation(problem,interpretation); | ||
2830 | PartialInterpretation.newElements(interpretation,element); | ||
2831 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
2832 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
2833 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
2834 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
2835 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
2836 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
2837 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2838 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2839 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
2840 | } | ||
2841 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2842 | find interpretation(problem,interpretation); | ||
2843 | PartialInterpretation.newElements(interpretation,element); | ||
2844 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
2845 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
2846 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
2847 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2848 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2849 | } | ||
2850 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2851 | find interpretation(problem,interpretation); | ||
2852 | PartialInterpretation.newElements(interpretation,element); | ||
2853 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
2854 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
2855 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
2856 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
2857 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
2858 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
2859 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2860 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2861 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
2862 | } | ||
2863 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2864 | find interpretation(problem,interpretation); | ||
2865 | PartialInterpretation.newElements(interpretation,element); | ||
2866 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
2867 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
2868 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
2869 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2870 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2871 | } | ||
2872 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2873 | find interpretation(problem,interpretation); | ||
2874 | PartialInterpretation.newElements(interpretation,element); | ||
2875 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
2876 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
2877 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
2878 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2879 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2880 | } | ||
2881 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2882 | find interpretation(problem,interpretation); | ||
2883 | PartialInterpretation.newElements(interpretation,element); | ||
2884 | find mayInstanceOfState_class(problem,interpretation,element); | ||
2885 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
2886 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
2887 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2888 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2889 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
2890 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
2891 | } | ||
2892 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2893 | find interpretation(problem,interpretation); | ||
2894 | PartialInterpretation.newElements(interpretation,element); | ||
2895 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
2896 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
2897 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
2898 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
2899 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
2900 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
2901 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
2902 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
2903 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
2904 | } | ||
2905 | |||
2906 | ////////// | ||
2907 | // 4.3 Relation refinement | ||
2908 | ////////// | ||
2909 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
2910 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2911 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
2912 | from: DefinedElement, to: DefinedElement) | ||
2913 | { | ||
2914 | find interpretation(problem,interpretation); | ||
2915 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2916 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
2917 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
2918 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
2919 | find mustExist(problem, interpretation, from); | ||
2920 | find mustExist(problem, interpretation, to); | ||
2921 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
2922 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
2923 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
2924 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
2925 | } | ||
2926 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
2927 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
2928 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
2929 | |||
2930 | ////////// | ||
2931 | // 0. Util | ||
2932 | ////////// | ||
2933 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2934 | PartialInterpretation.problem(interpretation,problem); | ||
2935 | } | ||
2936 | |||
2937 | ///////////////////////// | ||
2938 | // 0.1 Existence | ||
2939 | ///////////////////////// | ||
2940 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2941 | find interpretation(problem,interpretation); | ||
2942 | LogicProblem.elements(problem,element); | ||
2943 | } or { | ||
2944 | find interpretation(problem,interpretation); | ||
2945 | PartialInterpretation.newElements(interpretation,element); | ||
2946 | } | ||
2947 | |||
2948 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2949 | find mustExist(problem,interpretation,element); | ||
2950 | } or { | ||
2951 | find interpretation(problem,interpretation); | ||
2952 | neg find elementCloseWorld(element); | ||
2953 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2954 | } | ||
2955 | |||
2956 | private pattern elementCloseWorld(element:DefinedElement) { | ||
2957 | PartialInterpretation.openWorldElements(i,element); | ||
2958 | PartialInterpretation.maxNewElements(i,0); | ||
2959 | } or { | ||
2960 | Scope.targetTypeInterpretation(scope,interpretation); | ||
2961 | PartialTypeInterpratation.elements(interpretation,element); | ||
2962 | Scope.maxNewElements(scope,0); | ||
2963 | } | ||
2964 | |||
2965 | //////////////////////// | ||
2966 | // 0.2 Equivalence | ||
2967 | //////////////////////// | ||
2968 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
2969 | find mayExist(problem,interpretation,a); | ||
2970 | find mayExist(problem,interpretation,b); | ||
2971 | a == b; | ||
2972 | } | ||
2973 | |||
2974 | //////////////////////// | ||
2975 | // 0.3 Required Patterns by TypeIndexer | ||
2976 | //////////////////////// | ||
2977 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
2978 | find interpretation(problem,interpretation); | ||
2979 | LogicProblem.types(problem,type); | ||
2980 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2981 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2982 | } | ||
2983 | |||
2984 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
2985 | find interpretation(problem,interpretation); | ||
2986 | LogicProblem.types(problem,type); | ||
2987 | TypeDefinition.elements(type,element); | ||
2988 | } or { | ||
2989 | find interpretation(problem,interpretation); | ||
2990 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
2991 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
2992 | } | ||
2993 | |||
2994 | private pattern isPrimitive(element: PrimitiveElement) { | ||
2995 | PrimitiveElement(element); | ||
2996 | } | ||
2997 | |||
2998 | ////////// | ||
2999 | // 1. Problem-Specific Base Indexers | ||
3000 | ////////// | ||
3001 | // 1.1 Type Indexers | ||
3002 | ////////// | ||
3003 | // 1.1.1 primitive Type Indexers | ||
3004 | ////////// | ||
3005 | |||
3006 | ////////// | ||
3007 | // 1.1.2 domain-specific Type Indexers | ||
3008 | ////////// | ||
3009 | /** | ||
3010 | * An element must be an instance of type "Pseudostate class". | ||
3011 | */ | ||
3012 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3013 | Type.name(type,"Pseudostate class"); | ||
3014 | find directInstanceOf(problem,interpretation,element,type); | ||
3015 | } | ||
3016 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3017 | find interpretation(problem,interpretation); | ||
3018 | PartialInterpretation.scopes(interpretation,scope); | ||
3019 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3020 | Scope.maxNewElements(scope,0); | ||
3021 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3022 | Type.name(type,"Pseudostate class"); | ||
3023 | } | ||
3024 | |||
3025 | /** | ||
3026 | * An element may be an instance of type "Pseudostate class". | ||
3027 | */ | ||
3028 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3029 | { | ||
3030 | find interpretation(problem,interpretation); | ||
3031 | PartialInterpretation.newElements(interpretation,element); | ||
3032 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3033 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3034 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3035 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3036 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3037 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3038 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3039 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3040 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
3041 | neg find isPrimitive(element); | ||
3042 | } or { | ||
3043 | find interpretation(problem,interpretation); | ||
3044 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3045 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3046 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3047 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3048 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3049 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3050 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3051 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3052 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3053 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
3054 | neg find isPrimitive(element); | ||
3055 | } or | ||
3056 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
3057 | /** | ||
3058 | * An element must be an instance of type "Vertex class". | ||
3059 | */ | ||
3060 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3061 | Type.name(type,"Vertex class"); | ||
3062 | find directInstanceOf(problem,interpretation,element,type); | ||
3063 | } | ||
3064 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3065 | find interpretation(problem,interpretation); | ||
3066 | PartialInterpretation.scopes(interpretation,scope); | ||
3067 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3068 | Scope.maxNewElements(scope,0); | ||
3069 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3070 | Type.name(type,"Vertex class"); | ||
3071 | } | ||
3072 | |||
3073 | /** | ||
3074 | * An element may be an instance of type "Vertex class". | ||
3075 | */ | ||
3076 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3077 | { | ||
3078 | find interpretation(problem,interpretation); | ||
3079 | PartialInterpretation.newElements(interpretation,element); | ||
3080 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3081 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3082 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3083 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3084 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3085 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
3086 | neg find isPrimitive(element); | ||
3087 | } or { | ||
3088 | find interpretation(problem,interpretation); | ||
3089 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3090 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3091 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3092 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3093 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3094 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3095 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
3096 | neg find isPrimitive(element); | ||
3097 | } or | ||
3098 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
3099 | /** | ||
3100 | * An element must be an instance of type "Region class". | ||
3101 | */ | ||
3102 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3103 | Type.name(type,"Region class"); | ||
3104 | find directInstanceOf(problem,interpretation,element,type); | ||
3105 | } | ||
3106 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3107 | find interpretation(problem,interpretation); | ||
3108 | PartialInterpretation.scopes(interpretation,scope); | ||
3109 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3110 | Scope.maxNewElements(scope,0); | ||
3111 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3112 | Type.name(type,"Region class"); | ||
3113 | } | ||
3114 | |||
3115 | /** | ||
3116 | * An element may be an instance of type "Region class". | ||
3117 | */ | ||
3118 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3119 | { | ||
3120 | find interpretation(problem,interpretation); | ||
3121 | PartialInterpretation.newElements(interpretation,element); | ||
3122 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3123 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3124 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3125 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
3126 | neg find isPrimitive(element); | ||
3127 | } or { | ||
3128 | find interpretation(problem,interpretation); | ||
3129 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3130 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3131 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3132 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3133 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
3134 | neg find isPrimitive(element); | ||
3135 | } or | ||
3136 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
3137 | /** | ||
3138 | * An element must be an instance of type "Transition class". | ||
3139 | */ | ||
3140 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3141 | Type.name(type,"Transition class"); | ||
3142 | find directInstanceOf(problem,interpretation,element,type); | ||
3143 | } | ||
3144 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3145 | find interpretation(problem,interpretation); | ||
3146 | PartialInterpretation.scopes(interpretation,scope); | ||
3147 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3148 | Scope.maxNewElements(scope,0); | ||
3149 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3150 | Type.name(type,"Transition class"); | ||
3151 | } | ||
3152 | |||
3153 | /** | ||
3154 | * An element may be an instance of type "Transition class". | ||
3155 | */ | ||
3156 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3157 | { | ||
3158 | find interpretation(problem,interpretation); | ||
3159 | PartialInterpretation.newElements(interpretation,element); | ||
3160 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3161 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3162 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3163 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
3164 | neg find isPrimitive(element); | ||
3165 | } or { | ||
3166 | find interpretation(problem,interpretation); | ||
3167 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3168 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3169 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3170 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3171 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
3172 | neg find isPrimitive(element); | ||
3173 | } or | ||
3174 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
3175 | /** | ||
3176 | * An element must be an instance of type "Statechart class". | ||
3177 | */ | ||
3178 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3179 | Type.name(type,"Statechart class"); | ||
3180 | find directInstanceOf(problem,interpretation,element,type); | ||
3181 | } | ||
3182 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3183 | find interpretation(problem,interpretation); | ||
3184 | PartialInterpretation.scopes(interpretation,scope); | ||
3185 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3186 | Scope.maxNewElements(scope,0); | ||
3187 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3188 | Type.name(type,"Statechart class"); | ||
3189 | } | ||
3190 | |||
3191 | /** | ||
3192 | * An element may be an instance of type "Statechart class". | ||
3193 | */ | ||
3194 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3195 | { | ||
3196 | find interpretation(problem,interpretation); | ||
3197 | PartialInterpretation.newElements(interpretation,element); | ||
3198 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3199 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3200 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3201 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3202 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
3203 | neg find isPrimitive(element); | ||
3204 | } or { | ||
3205 | find interpretation(problem,interpretation); | ||
3206 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3207 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3208 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3209 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3210 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3211 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
3212 | neg find isPrimitive(element); | ||
3213 | } or | ||
3214 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
3215 | /** | ||
3216 | * An element must be an instance of type "Entry class". | ||
3217 | */ | ||
3218 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3219 | Type.name(type,"Entry class"); | ||
3220 | find directInstanceOf(problem,interpretation,element,type); | ||
3221 | } | ||
3222 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3223 | find interpretation(problem,interpretation); | ||
3224 | PartialInterpretation.scopes(interpretation,scope); | ||
3225 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3226 | Scope.maxNewElements(scope,0); | ||
3227 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3228 | Type.name(type,"Entry class"); | ||
3229 | } | ||
3230 | |||
3231 | /** | ||
3232 | * An element may be an instance of type "Entry class". | ||
3233 | */ | ||
3234 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3235 | { | ||
3236 | find interpretation(problem,interpretation); | ||
3237 | PartialInterpretation.newElements(interpretation,element); | ||
3238 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3239 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3240 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3241 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3242 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3243 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3244 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3245 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
3246 | neg find isPrimitive(element); | ||
3247 | } or { | ||
3248 | find interpretation(problem,interpretation); | ||
3249 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3250 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3251 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3252 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3253 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3254 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3255 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3256 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3257 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
3258 | neg find isPrimitive(element); | ||
3259 | } or | ||
3260 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
3261 | /** | ||
3262 | * An element must be an instance of type "Synchronization class". | ||
3263 | */ | ||
3264 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3265 | Type.name(type,"Synchronization class"); | ||
3266 | find directInstanceOf(problem,interpretation,element,type); | ||
3267 | } | ||
3268 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3269 | find interpretation(problem,interpretation); | ||
3270 | PartialInterpretation.scopes(interpretation,scope); | ||
3271 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3272 | Scope.maxNewElements(scope,0); | ||
3273 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3274 | Type.name(type,"Synchronization class"); | ||
3275 | } | ||
3276 | |||
3277 | /** | ||
3278 | * An element may be an instance of type "Synchronization class". | ||
3279 | */ | ||
3280 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3281 | { | ||
3282 | find interpretation(problem,interpretation); | ||
3283 | PartialInterpretation.newElements(interpretation,element); | ||
3284 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3285 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3286 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3287 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3288 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3289 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3290 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3291 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
3292 | neg find isPrimitive(element); | ||
3293 | } or { | ||
3294 | find interpretation(problem,interpretation); | ||
3295 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3296 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3297 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3298 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3299 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3300 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3301 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3302 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3303 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
3304 | neg find isPrimitive(element); | ||
3305 | } or | ||
3306 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
3307 | /** | ||
3308 | * An element must be an instance of type "State class". | ||
3309 | */ | ||
3310 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3311 | Type.name(type,"State class"); | ||
3312 | find directInstanceOf(problem,interpretation,element,type); | ||
3313 | } | ||
3314 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3315 | find interpretation(problem,interpretation); | ||
3316 | PartialInterpretation.scopes(interpretation,scope); | ||
3317 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3318 | Scope.maxNewElements(scope,0); | ||
3319 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3320 | Type.name(type,"State class"); | ||
3321 | } | ||
3322 | |||
3323 | /** | ||
3324 | * An element may be an instance of type "State class". | ||
3325 | */ | ||
3326 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3327 | { | ||
3328 | find interpretation(problem,interpretation); | ||
3329 | PartialInterpretation.newElements(interpretation,element); | ||
3330 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3331 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3332 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3333 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3334 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3335 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
3336 | neg find isPrimitive(element); | ||
3337 | } or { | ||
3338 | find interpretation(problem,interpretation); | ||
3339 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3340 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3341 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3342 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3343 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3344 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3345 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
3346 | neg find isPrimitive(element); | ||
3347 | } or | ||
3348 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
3349 | /** | ||
3350 | * An element must be an instance of type "RegularState class". | ||
3351 | */ | ||
3352 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3353 | Type.name(type,"RegularState class"); | ||
3354 | find directInstanceOf(problem,interpretation,element,type); | ||
3355 | } | ||
3356 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3357 | find interpretation(problem,interpretation); | ||
3358 | PartialInterpretation.scopes(interpretation,scope); | ||
3359 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3360 | Scope.maxNewElements(scope,0); | ||
3361 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3362 | Type.name(type,"RegularState class"); | ||
3363 | } | ||
3364 | |||
3365 | /** | ||
3366 | * An element may be an instance of type "RegularState class". | ||
3367 | */ | ||
3368 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3369 | { | ||
3370 | find interpretation(problem,interpretation); | ||
3371 | PartialInterpretation.newElements(interpretation,element); | ||
3372 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3373 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3374 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3375 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3376 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3377 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
3378 | neg find isPrimitive(element); | ||
3379 | } or { | ||
3380 | find interpretation(problem,interpretation); | ||
3381 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3382 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3383 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3384 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3385 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3386 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3387 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
3388 | neg find isPrimitive(element); | ||
3389 | } or | ||
3390 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
3391 | /** | ||
3392 | * An element must be an instance of type "CompositeElement class". | ||
3393 | */ | ||
3394 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3395 | Type.name(type,"CompositeElement class"); | ||
3396 | find directInstanceOf(problem,interpretation,element,type); | ||
3397 | } | ||
3398 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3399 | find interpretation(problem,interpretation); | ||
3400 | PartialInterpretation.scopes(interpretation,scope); | ||
3401 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3402 | Scope.maxNewElements(scope,0); | ||
3403 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3404 | Type.name(type,"CompositeElement class"); | ||
3405 | } | ||
3406 | |||
3407 | /** | ||
3408 | * An element may be an instance of type "CompositeElement class". | ||
3409 | */ | ||
3410 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3411 | { | ||
3412 | find interpretation(problem,interpretation); | ||
3413 | PartialInterpretation.newElements(interpretation,element); | ||
3414 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3415 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3416 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3417 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3418 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3419 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
3420 | neg find isPrimitive(element); | ||
3421 | } or { | ||
3422 | find interpretation(problem,interpretation); | ||
3423 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3424 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3425 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3426 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3427 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3428 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3429 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
3430 | neg find isPrimitive(element); | ||
3431 | } or | ||
3432 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
3433 | /** | ||
3434 | * An element must be an instance of type "Choice class". | ||
3435 | */ | ||
3436 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3437 | Type.name(type,"Choice class"); | ||
3438 | find directInstanceOf(problem,interpretation,element,type); | ||
3439 | } | ||
3440 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3441 | find interpretation(problem,interpretation); | ||
3442 | PartialInterpretation.scopes(interpretation,scope); | ||
3443 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3444 | Scope.maxNewElements(scope,0); | ||
3445 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3446 | Type.name(type,"Choice class"); | ||
3447 | } | ||
3448 | |||
3449 | /** | ||
3450 | * An element may be an instance of type "Choice class". | ||
3451 | */ | ||
3452 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3453 | { | ||
3454 | find interpretation(problem,interpretation); | ||
3455 | PartialInterpretation.newElements(interpretation,element); | ||
3456 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3457 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3458 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3459 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3460 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3461 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3462 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3463 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
3464 | neg find isPrimitive(element); | ||
3465 | } or { | ||
3466 | find interpretation(problem,interpretation); | ||
3467 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3468 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3469 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3470 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3471 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3472 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3473 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3474 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3475 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
3476 | neg find isPrimitive(element); | ||
3477 | } or | ||
3478 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
3479 | /** | ||
3480 | * An element must be an instance of type "Exit class". | ||
3481 | */ | ||
3482 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3483 | Type.name(type,"Exit class"); | ||
3484 | find directInstanceOf(problem,interpretation,element,type); | ||
3485 | } | ||
3486 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3487 | find interpretation(problem,interpretation); | ||
3488 | PartialInterpretation.scopes(interpretation,scope); | ||
3489 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3490 | Scope.maxNewElements(scope,0); | ||
3491 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3492 | Type.name(type,"Exit class"); | ||
3493 | } | ||
3494 | |||
3495 | /** | ||
3496 | * An element may be an instance of type "Exit class". | ||
3497 | */ | ||
3498 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3499 | { | ||
3500 | find interpretation(problem,interpretation); | ||
3501 | PartialInterpretation.newElements(interpretation,element); | ||
3502 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3503 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3504 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3505 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3506 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3507 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3508 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3509 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
3510 | neg find isPrimitive(element); | ||
3511 | } or { | ||
3512 | find interpretation(problem,interpretation); | ||
3513 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3514 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3515 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3516 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3517 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3518 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3519 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3520 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3521 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
3522 | neg find isPrimitive(element); | ||
3523 | } or | ||
3524 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
3525 | /** | ||
3526 | * An element must be an instance of type "FinalState class". | ||
3527 | */ | ||
3528 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3529 | Type.name(type,"FinalState class"); | ||
3530 | find directInstanceOf(problem,interpretation,element,type); | ||
3531 | } | ||
3532 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3533 | find interpretation(problem,interpretation); | ||
3534 | PartialInterpretation.scopes(interpretation,scope); | ||
3535 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3536 | Scope.maxNewElements(scope,0); | ||
3537 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3538 | Type.name(type,"FinalState class"); | ||
3539 | } | ||
3540 | |||
3541 | /** | ||
3542 | * An element may be an instance of type "FinalState class". | ||
3543 | */ | ||
3544 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3545 | { | ||
3546 | find interpretation(problem,interpretation); | ||
3547 | PartialInterpretation.newElements(interpretation,element); | ||
3548 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3549 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3550 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3551 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3552 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
3553 | neg find isPrimitive(element); | ||
3554 | } or { | ||
3555 | find interpretation(problem,interpretation); | ||
3556 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3557 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3558 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3559 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3560 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3561 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
3562 | neg find isPrimitive(element); | ||
3563 | } or | ||
3564 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
3565 | /** | ||
3566 | * An element must be an instance of type "Statechart class DefinedPart". | ||
3567 | */ | ||
3568 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3569 | Type.name(type,"Statechart class DefinedPart"); | ||
3570 | find directInstanceOf(problem,interpretation,element,type); | ||
3571 | } | ||
3572 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3573 | find interpretation(problem,interpretation); | ||
3574 | PartialInterpretation.scopes(interpretation,scope); | ||
3575 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3576 | Scope.maxNewElements(scope,0); | ||
3577 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3578 | Type.name(type,"Statechart class DefinedPart"); | ||
3579 | } | ||
3580 | |||
3581 | /** | ||
3582 | * An element may be an instance of type "Statechart class DefinedPart". | ||
3583 | */ | ||
3584 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3585 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
3586 | /** | ||
3587 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
3588 | */ | ||
3589 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3590 | Type.name(type,"Statechart class UndefinedPart"); | ||
3591 | find directInstanceOf(problem,interpretation,element,type); | ||
3592 | } | ||
3593 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3594 | find interpretation(problem,interpretation); | ||
3595 | PartialInterpretation.scopes(interpretation,scope); | ||
3596 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3597 | Scope.maxNewElements(scope,0); | ||
3598 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3599 | Type.name(type,"Statechart class UndefinedPart"); | ||
3600 | } | ||
3601 | |||
3602 | /** | ||
3603 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
3604 | */ | ||
3605 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3606 | { | ||
3607 | find interpretation(problem,interpretation); | ||
3608 | PartialInterpretation.newElements(interpretation,element); | ||
3609 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3610 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3611 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3612 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
3613 | neg find isPrimitive(element); | ||
3614 | } or { | ||
3615 | find interpretation(problem,interpretation); | ||
3616 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3617 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3618 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3619 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3620 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
3621 | neg find isPrimitive(element); | ||
3622 | } or | ||
3623 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
3624 | /** | ||
3625 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
3626 | */ | ||
3627 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3628 | Type.name(type,"CompositeElement class DefinedPart"); | ||
3629 | find directInstanceOf(problem,interpretation,element,type); | ||
3630 | } | ||
3631 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3632 | find interpretation(problem,interpretation); | ||
3633 | PartialInterpretation.scopes(interpretation,scope); | ||
3634 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3635 | Scope.maxNewElements(scope,0); | ||
3636 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3637 | Type.name(type,"CompositeElement class DefinedPart"); | ||
3638 | } | ||
3639 | |||
3640 | /** | ||
3641 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
3642 | */ | ||
3643 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3644 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
3645 | /** | ||
3646 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
3647 | */ | ||
3648 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3649 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
3650 | find directInstanceOf(problem,interpretation,element,type); | ||
3651 | } | ||
3652 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3653 | find interpretation(problem,interpretation); | ||
3654 | PartialInterpretation.scopes(interpretation,scope); | ||
3655 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3656 | Scope.maxNewElements(scope,0); | ||
3657 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3658 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
3659 | } | ||
3660 | |||
3661 | /** | ||
3662 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
3663 | */ | ||
3664 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3665 | { | ||
3666 | find interpretation(problem,interpretation); | ||
3667 | PartialInterpretation.newElements(interpretation,element); | ||
3668 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3669 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3670 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3671 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3672 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
3673 | neg find isPrimitive(element); | ||
3674 | } or { | ||
3675 | find interpretation(problem,interpretation); | ||
3676 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3677 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3678 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3679 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3680 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3681 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
3682 | neg find isPrimitive(element); | ||
3683 | } or | ||
3684 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
3685 | |||
3686 | ////////// | ||
3687 | // 1.2 Relation Declaration Indexers | ||
3688 | ////////// | ||
3689 | /** | ||
3690 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
3691 | */ | ||
3692 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
3693 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3694 | source: DefinedElement, target:DefinedElement) | ||
3695 | { | ||
3696 | find interpretation(problem,interpretation); | ||
3697 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3698 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
3699 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
3700 | BinaryElementRelationLink.param1(link,source); | ||
3701 | BinaryElementRelationLink.param2(link,target); | ||
3702 | } | ||
3703 | /** | ||
3704 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
3705 | */ | ||
3706 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
3707 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3708 | source: DefinedElement, target:DefinedElement) | ||
3709 | { | ||
3710 | find interpretation(problem,interpretation); | ||
3711 | // The two endpoint of the link have to exist | ||
3712 | find mayExist(problem, interpretation, source); | ||
3713 | find mayExist(problem, interpretation, target); | ||
3714 | // Type consistency | ||
3715 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
3716 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
3717 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
3718 | // the upper bound of the opposite reference multiplicity should be considered. | ||
3719 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
3720 | check(numberOfExistingOppositeReferences < 1); | ||
3721 | } or { | ||
3722 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
3723 | } | ||
3724 | /** | ||
3725 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
3726 | */ | ||
3727 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
3728 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3729 | source: DefinedElement, target:DefinedElement) | ||
3730 | { | ||
3731 | find interpretation(problem,interpretation); | ||
3732 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3733 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
3734 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
3735 | BinaryElementRelationLink.param1(link,source); | ||
3736 | BinaryElementRelationLink.param2(link,target); | ||
3737 | } | ||
3738 | /** | ||
3739 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
3740 | */ | ||
3741 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
3742 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3743 | source: DefinedElement, target:DefinedElement) | ||
3744 | { | ||
3745 | find interpretation(problem,interpretation); | ||
3746 | // The two endpoint of the link have to exist | ||
3747 | find mayExist(problem, interpretation, source); | ||
3748 | find mayExist(problem, interpretation, target); | ||
3749 | // Type consistency | ||
3750 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
3751 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
3752 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
3753 | // the upper bound of the opposite reference multiplicity should be considered. | ||
3754 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
3755 | check(numberOfExistingOppositeReferences < 1); | ||
3756 | // The reference is containment, then a new reference cannot be create if: | ||
3757 | // 1. Multiple parents | ||
3758 | neg find mustContains4(problem,interpretation,_,target); | ||
3759 | // 2. Circle in the containment hierarchy | ||
3760 | neg find mustTransitiveContains(source,target); | ||
3761 | } or { | ||
3762 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
3763 | } | ||
3764 | /** | ||
3765 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
3766 | */ | ||
3767 | private pattern mustInRelationvertices_reference_Region( | ||
3768 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3769 | source: DefinedElement, target:DefinedElement) | ||
3770 | { | ||
3771 | find interpretation(problem,interpretation); | ||
3772 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3773 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
3774 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
3775 | BinaryElementRelationLink.param1(link,source); | ||
3776 | BinaryElementRelationLink.param2(link,target); | ||
3777 | } | ||
3778 | /** | ||
3779 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
3780 | */ | ||
3781 | private pattern mayInRelationvertices_reference_Region( | ||
3782 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3783 | source: DefinedElement, target:DefinedElement) | ||
3784 | { | ||
3785 | find interpretation(problem,interpretation); | ||
3786 | // The two endpoint of the link have to exist | ||
3787 | find mayExist(problem, interpretation, source); | ||
3788 | find mayExist(problem, interpretation, target); | ||
3789 | // Type consistency | ||
3790 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
3791 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
3792 | // The reference is containment, then a new reference cannot be create if: | ||
3793 | // 1. Multiple parents | ||
3794 | neg find mustContains4(problem,interpretation,_,target); | ||
3795 | // 2. Circle in the containment hierarchy | ||
3796 | neg find mustTransitiveContains(source,target); | ||
3797 | } or { | ||
3798 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
3799 | } | ||
3800 | /** | ||
3801 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
3802 | */ | ||
3803 | private pattern mustInRelationtarget_reference_Transition( | ||
3804 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3805 | source: DefinedElement, target:DefinedElement) | ||
3806 | { | ||
3807 | find interpretation(problem,interpretation); | ||
3808 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3809 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
3810 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
3811 | BinaryElementRelationLink.param1(link,source); | ||
3812 | BinaryElementRelationLink.param2(link,target); | ||
3813 | } | ||
3814 | /** | ||
3815 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
3816 | */ | ||
3817 | private pattern mayInRelationtarget_reference_Transition( | ||
3818 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3819 | source: DefinedElement, target:DefinedElement) | ||
3820 | { | ||
3821 | find interpretation(problem,interpretation); | ||
3822 | // The two endpoint of the link have to exist | ||
3823 | find mayExist(problem, interpretation, source); | ||
3824 | find mayExist(problem, interpretation, target); | ||
3825 | // Type consistency | ||
3826 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
3827 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
3828 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
3829 | // the upper bound of the multiplicity should be considered. | ||
3830 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
3831 | check(numberOfExistingReferences < 1); | ||
3832 | } or { | ||
3833 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
3834 | } | ||
3835 | /** | ||
3836 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
3837 | */ | ||
3838 | private pattern mustInRelationsource_reference_Transition( | ||
3839 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3840 | source: DefinedElement, target:DefinedElement) | ||
3841 | { | ||
3842 | find interpretation(problem,interpretation); | ||
3843 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3844 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
3845 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
3846 | BinaryElementRelationLink.param1(link,source); | ||
3847 | BinaryElementRelationLink.param2(link,target); | ||
3848 | } | ||
3849 | /** | ||
3850 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
3851 | */ | ||
3852 | private pattern mayInRelationsource_reference_Transition( | ||
3853 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3854 | source: DefinedElement, target:DefinedElement) | ||
3855 | { | ||
3856 | find interpretation(problem,interpretation); | ||
3857 | // The two endpoint of the link have to exist | ||
3858 | find mayExist(problem, interpretation, source); | ||
3859 | find mayExist(problem, interpretation, target); | ||
3860 | // Type consistency | ||
3861 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
3862 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
3863 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
3864 | // the upper bound of the multiplicity should be considered. | ||
3865 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
3866 | check(numberOfExistingReferences < 1); | ||
3867 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
3868 | // 1. Multiple parents | ||
3869 | neg find mustContains4(problem,interpretation,source,_); | ||
3870 | // 2. Circle in the containment hierarchy | ||
3871 | neg find mustTransitiveContains(source,target); | ||
3872 | } or { | ||
3873 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
3874 | } | ||
3875 | /** | ||
3876 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
3877 | */ | ||
3878 | private pattern mustInRelationregions_reference_CompositeElement( | ||
3879 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3880 | source: DefinedElement, target:DefinedElement) | ||
3881 | { | ||
3882 | find interpretation(problem,interpretation); | ||
3883 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3884 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
3885 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
3886 | BinaryElementRelationLink.param1(link,source); | ||
3887 | BinaryElementRelationLink.param2(link,target); | ||
3888 | } | ||
3889 | /** | ||
3890 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
3891 | */ | ||
3892 | private pattern mayInRelationregions_reference_CompositeElement( | ||
3893 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3894 | source: DefinedElement, target:DefinedElement) | ||
3895 | { | ||
3896 | find interpretation(problem,interpretation); | ||
3897 | // The two endpoint of the link have to exist | ||
3898 | find mayExist(problem, interpretation, source); | ||
3899 | find mayExist(problem, interpretation, target); | ||
3900 | // Type consistency | ||
3901 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
3902 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
3903 | // The reference is containment, then a new reference cannot be create if: | ||
3904 | // 1. Multiple parents | ||
3905 | neg find mustContains4(problem,interpretation,_,target); | ||
3906 | // 2. Circle in the containment hierarchy | ||
3907 | neg find mustTransitiveContains(source,target); | ||
3908 | } or { | ||
3909 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
3910 | } | ||
3911 | |||
3912 | ////////// | ||
3913 | // 1.3 Relation Definition Indexers | ||
3914 | ////////// | ||
3915 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
3916 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
3917 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3918 | var_r1, var_e1) | ||
3919 | { | ||
3920 | find interpretation(problem,interpretation); | ||
3921 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3922 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
3923 | // r1 is exported | ||
3924 | // e1 is exported | ||
3925 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3926 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
3927 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
3928 | var_virtual0 == var_e1; | ||
3929 | } | ||
3930 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
3931 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3932 | var_r1, var_e1) | ||
3933 | { | ||
3934 | find interpretation(problem,interpretation); | ||
3935 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3936 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
3937 | // r1 is exported | ||
3938 | // e1 is exported | ||
3939 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3940 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
3941 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
3942 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
3943 | } | ||
3944 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
3945 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3946 | var_r1, var_e1) | ||
3947 | { | ||
3948 | find interpretation(problem,interpretation); | ||
3949 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3950 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
3951 | // r1 is exported | ||
3952 | // e1 is exported | ||
3953 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3954 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
3955 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
3956 | var_virtual0 == var_e1; | ||
3957 | } | ||
3958 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
3959 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
3960 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3961 | var_r1) | ||
3962 | { | ||
3963 | find interpretation(problem,interpretation); | ||
3964 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3965 | // r1 is exported | ||
3966 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
3967 | } | ||
3968 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
3969 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3970 | var_r1) | ||
3971 | { | ||
3972 | find interpretation(problem,interpretation); | ||
3973 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3974 | // r1 is exported | ||
3975 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
3976 | } | ||
3977 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
3978 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3979 | var_r1) | ||
3980 | { | ||
3981 | find interpretation(problem,interpretation); | ||
3982 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
3983 | // r1 is exported | ||
3984 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
3985 | } | ||
3986 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
3987 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
3988 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3989 | var_r) | ||
3990 | { | ||
3991 | find interpretation(problem,interpretation); | ||
3992 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
3993 | // r is exported | ||
3994 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
3995 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
3996 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
3997 | } | ||
3998 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
3999 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4000 | var_r) | ||
4001 | { | ||
4002 | find interpretation(problem,interpretation); | ||
4003 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4004 | // r is exported | ||
4005 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
4006 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
4007 | var_e1 != var_e2; | ||
4008 | } | ||
4009 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
4010 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4011 | var_r) | ||
4012 | { | ||
4013 | find interpretation(problem,interpretation); | ||
4014 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4015 | // r is exported | ||
4016 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
4017 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
4018 | var_e1 != var_e2; | ||
4019 | } | ||
4020 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
4021 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
4022 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4023 | var_t, var_src, var_trg) | ||
4024 | { | ||
4025 | find interpretation(problem,interpretation); | ||
4026 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4027 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
4028 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
4029 | // t is exported | ||
4030 | // src is exported | ||
4031 | // trg is exported | ||
4032 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4033 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
4034 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4035 | var_virtual0 == var_src; | ||
4036 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4037 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
4038 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4039 | var_virtual1 == var_trg; | ||
4040 | } | ||
4041 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
4042 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4043 | var_t, var_src, var_trg) | ||
4044 | { | ||
4045 | find interpretation(problem,interpretation); | ||
4046 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4047 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
4048 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
4049 | // t is exported | ||
4050 | // src is exported | ||
4051 | // trg is exported | ||
4052 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4053 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
4054 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4055 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
4056 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4057 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
4058 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4059 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
4060 | } | ||
4061 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
4062 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4063 | var_t, var_src, var_trg) | ||
4064 | { | ||
4065 | find interpretation(problem,interpretation); | ||
4066 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4067 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
4068 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
4069 | // t is exported | ||
4070 | // src is exported | ||
4071 | // trg is exported | ||
4072 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4073 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
4074 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4075 | var_virtual0 == var_src; | ||
4076 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4077 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
4078 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4079 | var_virtual1 == var_trg; | ||
4080 | } | ||
4081 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
4082 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
4083 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4084 | var_t, var_e) | ||
4085 | { | ||
4086 | find interpretation(problem,interpretation); | ||
4087 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4088 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4089 | // t is exported | ||
4090 | // e is exported | ||
4091 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
4092 | } | ||
4093 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
4094 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4095 | var_t, var_e) | ||
4096 | { | ||
4097 | find interpretation(problem,interpretation); | ||
4098 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4099 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4100 | // t is exported | ||
4101 | // e is exported | ||
4102 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
4103 | } | ||
4104 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
4105 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4106 | var_t, var_e) | ||
4107 | { | ||
4108 | find interpretation(problem,interpretation); | ||
4109 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4110 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4111 | // t is exported | ||
4112 | // e is exported | ||
4113 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
4114 | } | ||
4115 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
4116 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
4117 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4118 | var_e) | ||
4119 | { | ||
4120 | find interpretation(problem,interpretation); | ||
4121 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4122 | // e is exported | ||
4123 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
4124 | } | ||
4125 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
4126 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4127 | var_e) | ||
4128 | { | ||
4129 | find interpretation(problem,interpretation); | ||
4130 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4131 | // e is exported | ||
4132 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
4133 | } | ||
4134 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
4135 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4136 | var_e) | ||
4137 | { | ||
4138 | find interpretation(problem,interpretation); | ||
4139 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4140 | // e is exported | ||
4141 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
4142 | } | ||
4143 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
4144 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
4145 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4146 | var_e, var_t1, var_t2) | ||
4147 | { | ||
4148 | find interpretation(problem,interpretation); | ||
4149 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4150 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
4151 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
4152 | // e is exported | ||
4153 | // t1 is exported | ||
4154 | // t2 is exported | ||
4155 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4156 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4157 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4158 | var_virtual0 == var_t1; | ||
4159 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4160 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
4161 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
4162 | var_virtual1 == var_t2; | ||
4163 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
4164 | } | ||
4165 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
4166 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4167 | var_e, var_t1, var_t2) | ||
4168 | { | ||
4169 | find interpretation(problem,interpretation); | ||
4170 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4171 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
4172 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
4173 | // e is exported | ||
4174 | // t1 is exported | ||
4175 | // t2 is exported | ||
4176 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4177 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4178 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4179 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
4180 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4181 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
4182 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
4183 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
4184 | var_t1 != var_t2; | ||
4185 | } | ||
4186 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
4187 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4188 | var_e, var_t1, var_t2) | ||
4189 | { | ||
4190 | find interpretation(problem,interpretation); | ||
4191 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4192 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
4193 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
4194 | // e is exported | ||
4195 | // t1 is exported | ||
4196 | // t2 is exported | ||
4197 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4198 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4199 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4200 | var_virtual0 == var_t1; | ||
4201 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4202 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
4203 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
4204 | var_virtual1 == var_t2; | ||
4205 | var_t1 != var_t2; | ||
4206 | } | ||
4207 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
4208 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
4209 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4210 | var_t, var_e) | ||
4211 | { | ||
4212 | find interpretation(problem,interpretation); | ||
4213 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4214 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4215 | // t is exported | ||
4216 | // e is exported | ||
4217 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4218 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4219 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4220 | var_virtual0 == var_t; | ||
4221 | } | ||
4222 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
4223 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4224 | var_t, var_e) | ||
4225 | { | ||
4226 | find interpretation(problem,interpretation); | ||
4227 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4228 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
4229 | // t is exported | ||
4230 | // e is exported | ||
4231 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
4232 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4233 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4234 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
4235 | } | ||
4236 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
4237 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4238 | var_t, var_e) | ||
4239 | { | ||
4240 | find interpretation(problem,interpretation); | ||
4241 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4242 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4243 | // t is exported | ||
4244 | // e is exported | ||
4245 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4246 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4247 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4248 | var_virtual0 == var_t; | ||
4249 | } | ||
4250 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
4251 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
4252 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4253 | var_t, var_f) | ||
4254 | { | ||
4255 | find interpretation(problem,interpretation); | ||
4256 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4257 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4258 | // t is exported | ||
4259 | // f is exported | ||
4260 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4261 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
4262 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4263 | var_virtual0 == var_t; | ||
4264 | } | ||
4265 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
4266 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4267 | var_t, var_f) | ||
4268 | { | ||
4269 | find interpretation(problem,interpretation); | ||
4270 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4271 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4272 | // t is exported | ||
4273 | // f is exported | ||
4274 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4275 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
4276 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4277 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
4278 | } | ||
4279 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
4280 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4281 | var_t, var_f) | ||
4282 | { | ||
4283 | find interpretation(problem,interpretation); | ||
4284 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4285 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4286 | // t is exported | ||
4287 | // f is exported | ||
4288 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4289 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
4290 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4291 | var_virtual0 == var_t; | ||
4292 | } | ||
4293 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
4294 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
4295 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4296 | var_region) | ||
4297 | { | ||
4298 | find interpretation(problem,interpretation); | ||
4299 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4300 | // region is exported | ||
4301 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
4302 | } | ||
4303 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
4304 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4305 | var_region) | ||
4306 | { | ||
4307 | find interpretation(problem,interpretation); | ||
4308 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
4309 | // region is exported | ||
4310 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
4311 | } | ||
4312 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
4313 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4314 | var_region) | ||
4315 | { | ||
4316 | find interpretation(problem,interpretation); | ||
4317 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4318 | // region is exported | ||
4319 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
4320 | } | ||
4321 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
4322 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
4323 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4324 | var_region, var_state) | ||
4325 | { | ||
4326 | find interpretation(problem,interpretation); | ||
4327 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4328 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
4329 | // region is exported | ||
4330 | // state is exported | ||
4331 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4332 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
4333 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4334 | var_virtual0 == var_state; | ||
4335 | } | ||
4336 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
4337 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4338 | var_region, var_state) | ||
4339 | { | ||
4340 | find interpretation(problem,interpretation); | ||
4341 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
4342 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
4343 | // region is exported | ||
4344 | // state is exported | ||
4345 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
4346 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
4347 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4348 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
4349 | } | ||
4350 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
4351 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4352 | var_region, var_state) | ||
4353 | { | ||
4354 | find interpretation(problem,interpretation); | ||
4355 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4356 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
4357 | // region is exported | ||
4358 | // state is exported | ||
4359 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4360 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
4361 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4362 | var_virtual0 == var_state; | ||
4363 | } | ||
4364 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
4365 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
4366 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4367 | var_c) | ||
4368 | { | ||
4369 | find interpretation(problem,interpretation); | ||
4370 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4371 | // c is exported | ||
4372 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
4373 | } | ||
4374 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
4375 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4376 | var_c) | ||
4377 | { | ||
4378 | find interpretation(problem,interpretation); | ||
4379 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
4380 | // c is exported | ||
4381 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
4382 | } | ||
4383 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
4384 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4385 | var_c) | ||
4386 | { | ||
4387 | find interpretation(problem,interpretation); | ||
4388 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4389 | // c is exported | ||
4390 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
4391 | } | ||
4392 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
4393 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
4394 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4395 | var_c) | ||
4396 | { | ||
4397 | find interpretation(problem,interpretation); | ||
4398 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4399 | // c is exported | ||
4400 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
4401 | } | ||
4402 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
4403 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4404 | var_c) | ||
4405 | { | ||
4406 | find interpretation(problem,interpretation); | ||
4407 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
4408 | // c is exported | ||
4409 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
4410 | } | ||
4411 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
4412 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4413 | var_c) | ||
4414 | { | ||
4415 | find interpretation(problem,interpretation); | ||
4416 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4417 | // c is exported | ||
4418 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
4419 | } | ||
4420 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
4421 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
4422 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4423 | var_s) | ||
4424 | { | ||
4425 | find interpretation(problem,interpretation); | ||
4426 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4427 | // s is exported | ||
4428 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
4429 | } | ||
4430 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
4431 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4432 | var_s) | ||
4433 | { | ||
4434 | find interpretation(problem,interpretation); | ||
4435 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4436 | // s is exported | ||
4437 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
4438 | } | ||
4439 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
4440 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4441 | var_s) | ||
4442 | { | ||
4443 | find interpretation(problem,interpretation); | ||
4444 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4445 | // s is exported | ||
4446 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
4447 | } | ||
4448 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
4449 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
4450 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4451 | var_s) | ||
4452 | { | ||
4453 | find interpretation(problem,interpretation); | ||
4454 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4455 | // s is exported | ||
4456 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
4457 | } | ||
4458 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
4459 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4460 | var_s) | ||
4461 | { | ||
4462 | find interpretation(problem,interpretation); | ||
4463 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4464 | // s is exported | ||
4465 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
4466 | } | ||
4467 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
4468 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4469 | var_s) | ||
4470 | { | ||
4471 | find interpretation(problem,interpretation); | ||
4472 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4473 | // s is exported | ||
4474 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
4475 | } | ||
4476 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
4477 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
4478 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4479 | var_s, var_v1, var_v2) | ||
4480 | { | ||
4481 | find interpretation(problem,interpretation); | ||
4482 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4483 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4484 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4485 | // s is exported | ||
4486 | // v1 is exported | ||
4487 | // v2 is exported | ||
4488 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
4489 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
4490 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
4491 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4492 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4493 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4494 | var_virtual0 == var_v1; | ||
4495 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4496 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4497 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4498 | var_virtual1 == var_v2; | ||
4499 | }or{ | ||
4500 | find interpretation(problem,interpretation); | ||
4501 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4502 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4503 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4504 | // s is exported | ||
4505 | // v1 is exported | ||
4506 | // v2 is exported | ||
4507 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
4508 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
4509 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
4510 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4511 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4512 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4513 | var_virtual0 == var_v1; | ||
4514 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4515 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4516 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4517 | var_virtual1 == var_v2; | ||
4518 | } | ||
4519 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
4520 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4521 | var_s, var_v1, var_v2) | ||
4522 | { | ||
4523 | find interpretation(problem,interpretation); | ||
4524 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4525 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4526 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4527 | // s is exported | ||
4528 | // v1 is exported | ||
4529 | // v2 is exported | ||
4530 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
4531 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
4532 | var_t1 != var_t2; | ||
4533 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4534 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4535 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4536 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
4537 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4538 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4539 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4540 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
4541 | }or{ | ||
4542 | find interpretation(problem,interpretation); | ||
4543 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4544 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4545 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4546 | // s is exported | ||
4547 | // v1 is exported | ||
4548 | // v2 is exported | ||
4549 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
4550 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
4551 | var_t1 != var_t2; | ||
4552 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4553 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4554 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4555 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
4556 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4557 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4558 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4559 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
4560 | } | ||
4561 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
4562 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4563 | var_s, var_v1, var_v2) | ||
4564 | { | ||
4565 | find interpretation(problem,interpretation); | ||
4566 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4567 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4568 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4569 | // s is exported | ||
4570 | // v1 is exported | ||
4571 | // v2 is exported | ||
4572 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
4573 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
4574 | var_t1 != var_t2; | ||
4575 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4576 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4577 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4578 | var_virtual0 == var_v1; | ||
4579 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4580 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4581 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4582 | var_virtual1 == var_v2; | ||
4583 | }or{ | ||
4584 | find interpretation(problem,interpretation); | ||
4585 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4586 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4587 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4588 | // s is exported | ||
4589 | // v1 is exported | ||
4590 | // v2 is exported | ||
4591 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
4592 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
4593 | var_t1 != var_t2; | ||
4594 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4595 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4596 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4597 | var_virtual0 == var_v1; | ||
4598 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4599 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4600 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4601 | var_virtual1 == var_v2; | ||
4602 | } | ||
4603 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
4604 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
4605 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4606 | var_s) | ||
4607 | { | ||
4608 | find interpretation(problem,interpretation); | ||
4609 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4610 | // s is exported | ||
4611 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
4612 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
4613 | } | ||
4614 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
4615 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4616 | var_s) | ||
4617 | { | ||
4618 | find interpretation(problem,interpretation); | ||
4619 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4620 | // s is exported | ||
4621 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
4622 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
4623 | } | ||
4624 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
4625 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4626 | var_s) | ||
4627 | { | ||
4628 | find interpretation(problem,interpretation); | ||
4629 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4630 | // s is exported | ||
4631 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
4632 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
4633 | } | ||
4634 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
4635 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
4636 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4637 | var_v) | ||
4638 | { | ||
4639 | find interpretation(problem,interpretation); | ||
4640 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4641 | // v is exported | ||
4642 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
4643 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
4644 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
4645 | } | ||
4646 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
4647 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4648 | var_v) | ||
4649 | { | ||
4650 | find interpretation(problem,interpretation); | ||
4651 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4652 | // v is exported | ||
4653 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
4654 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
4655 | var_trg1 != var_trg2; | ||
4656 | } | ||
4657 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
4658 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4659 | var_v) | ||
4660 | { | ||
4661 | find interpretation(problem,interpretation); | ||
4662 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4663 | // v is exported | ||
4664 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
4665 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
4666 | var_trg1 != var_trg2; | ||
4667 | } | ||
4668 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
4669 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
4670 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4671 | var_v) | ||
4672 | { | ||
4673 | find interpretation(problem,interpretation); | ||
4674 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4675 | // v is exported | ||
4676 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
4677 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
4678 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
4679 | } | ||
4680 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
4681 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4682 | var_v) | ||
4683 | { | ||
4684 | find interpretation(problem,interpretation); | ||
4685 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4686 | // v is exported | ||
4687 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
4688 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
4689 | var_src1 != var_src2; | ||
4690 | } | ||
4691 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
4692 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4693 | var_v) | ||
4694 | { | ||
4695 | find interpretation(problem,interpretation); | ||
4696 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4697 | // v is exported | ||
4698 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
4699 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
4700 | var_src1 != var_src2; | ||
4701 | } | ||
4702 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
4703 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
4704 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4705 | var_s, var_v1, var_v2) | ||
4706 | { | ||
4707 | find interpretation(problem,interpretation); | ||
4708 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4709 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4710 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4711 | // s is exported | ||
4712 | // v1 is exported | ||
4713 | // v2 is exported | ||
4714 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
4715 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
4716 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
4717 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
4718 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4719 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4720 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4721 | var_virtual1 == var_v1; | ||
4722 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
4723 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
4724 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
4725 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
4726 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
4727 | var_virtual3 == var_v2; | ||
4728 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
4729 | }or{ | ||
4730 | find interpretation(problem,interpretation); | ||
4731 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4732 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4733 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4734 | // s is exported | ||
4735 | // v1 is exported | ||
4736 | // v2 is exported | ||
4737 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
4738 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
4739 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
4740 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
4741 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4742 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4743 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4744 | var_virtual1 == var_v1; | ||
4745 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
4746 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
4747 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
4748 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
4749 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
4750 | var_virtual3 == var_v2; | ||
4751 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
4752 | } | ||
4753 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
4754 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4755 | var_s, var_v1, var_v2) | ||
4756 | { | ||
4757 | find interpretation(problem,interpretation); | ||
4758 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4759 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4760 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4761 | // s is exported | ||
4762 | // v1 is exported | ||
4763 | // v2 is exported | ||
4764 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
4765 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
4766 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
4767 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
4768 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4769 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4770 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4771 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
4772 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
4773 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
4774 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
4775 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
4776 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
4777 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
4778 | var_r1 != var_r2; | ||
4779 | }or{ | ||
4780 | find interpretation(problem,interpretation); | ||
4781 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4782 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4783 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4784 | // s is exported | ||
4785 | // v1 is exported | ||
4786 | // v2 is exported | ||
4787 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
4788 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
4789 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
4790 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
4791 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4792 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4793 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4794 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
4795 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
4796 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
4797 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
4798 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
4799 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
4800 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
4801 | var_r1 != var_r2; | ||
4802 | } | ||
4803 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
4804 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4805 | var_s, var_v1, var_v2) | ||
4806 | { | ||
4807 | find interpretation(problem,interpretation); | ||
4808 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4809 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4810 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4811 | // s is exported | ||
4812 | // v1 is exported | ||
4813 | // v2 is exported | ||
4814 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
4815 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
4816 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
4817 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
4818 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4819 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4820 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4821 | var_virtual1 == var_v1; | ||
4822 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
4823 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
4824 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
4825 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
4826 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
4827 | var_virtual3 == var_v2; | ||
4828 | var_r1 != var_r2; | ||
4829 | }or{ | ||
4830 | find interpretation(problem,interpretation); | ||
4831 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4832 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4833 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4834 | // s is exported | ||
4835 | // v1 is exported | ||
4836 | // v2 is exported | ||
4837 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
4838 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
4839 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
4840 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
4841 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4842 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4843 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4844 | var_virtual1 == var_v1; | ||
4845 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
4846 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
4847 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
4848 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
4849 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
4850 | var_virtual3 == var_v2; | ||
4851 | var_r1 != var_r2; | ||
4852 | } | ||
4853 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
4854 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
4855 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4856 | var_parent, var_child) | ||
4857 | { | ||
4858 | find interpretation(problem,interpretation); | ||
4859 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
4860 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
4861 | // parent is exported | ||
4862 | // child is exported | ||
4863 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
4864 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
4865 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4866 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4867 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4868 | var_virtual1 == var_child; | ||
4869 | } | ||
4870 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
4871 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4872 | var_parent, var_child) | ||
4873 | { | ||
4874 | find interpretation(problem,interpretation); | ||
4875 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
4876 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
4877 | // parent is exported | ||
4878 | // child is exported | ||
4879 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
4880 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
4881 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4882 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4883 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4884 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
4885 | } | ||
4886 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
4887 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4888 | var_parent, var_child) | ||
4889 | { | ||
4890 | find interpretation(problem,interpretation); | ||
4891 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
4892 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
4893 | // parent is exported | ||
4894 | // child is exported | ||
4895 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
4896 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
4897 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4898 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4899 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4900 | var_virtual1 == var_child; | ||
4901 | } | ||
4902 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
4903 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
4904 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4905 | var_s, var_v) | ||
4906 | { | ||
4907 | find interpretation(problem,interpretation); | ||
4908 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4909 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
4910 | // s is exported | ||
4911 | // v is exported | ||
4912 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
4913 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
4914 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
4915 | }or{ | ||
4916 | find interpretation(problem,interpretation); | ||
4917 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4918 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
4919 | // s is exported | ||
4920 | // v is exported | ||
4921 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
4922 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
4923 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
4924 | } | ||
4925 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
4926 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4927 | var_s, var_v) | ||
4928 | { | ||
4929 | find interpretation(problem,interpretation); | ||
4930 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4931 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
4932 | // s is exported | ||
4933 | // v is exported | ||
4934 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
4935 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
4936 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
4937 | }or{ | ||
4938 | find interpretation(problem,interpretation); | ||
4939 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4940 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
4941 | // s is exported | ||
4942 | // v is exported | ||
4943 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
4944 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
4945 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
4946 | } | ||
4947 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
4948 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4949 | var_s, var_v) | ||
4950 | { | ||
4951 | find interpretation(problem,interpretation); | ||
4952 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4953 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
4954 | // s is exported | ||
4955 | // v is exported | ||
4956 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
4957 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
4958 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
4959 | }or{ | ||
4960 | find interpretation(problem,interpretation); | ||
4961 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4962 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
4963 | // s is exported | ||
4964 | // v is exported | ||
4965 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
4966 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
4967 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
4968 | } | ||
4969 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
4970 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
4971 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4972 | var_composite) | ||
4973 | { | ||
4974 | find interpretation(problem,interpretation); | ||
4975 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
4976 | // composite is exported | ||
4977 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
4978 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
4979 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4980 | var_virtual0 == var_region1; | ||
4981 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
4982 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
4983 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
4984 | var_virtual1 == var_region2; | ||
4985 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
4986 | } | ||
4987 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
4988 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4989 | var_composite) | ||
4990 | { | ||
4991 | find interpretation(problem,interpretation); | ||
4992 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
4993 | // composite is exported | ||
4994 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
4995 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
4996 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4997 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
4998 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
4999 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
5000 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
5001 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
5002 | var_region1 != var_region2; | ||
5003 | } | ||
5004 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
5005 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5006 | var_composite) | ||
5007 | { | ||
5008 | find interpretation(problem,interpretation); | ||
5009 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5010 | // composite is exported | ||
5011 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5012 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
5013 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5014 | var_virtual0 == var_region1; | ||
5015 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5016 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
5017 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
5018 | var_virtual1 == var_region2; | ||
5019 | var_region1 != var_region2; | ||
5020 | } | ||
5021 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
5022 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
5023 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5024 | var_s) | ||
5025 | { | ||
5026 | find interpretation(problem,interpretation); | ||
5027 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5028 | // s is exported | ||
5029 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5030 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5031 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5032 | var_virtual0 == var_s; | ||
5033 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5034 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5035 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5036 | var_virtual1 == var_s; | ||
5037 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5038 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5039 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5040 | var_virtual2 == var_s; | ||
5041 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
5042 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
5043 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
5044 | }or{ | ||
5045 | find interpretation(problem,interpretation); | ||
5046 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5047 | // s is exported | ||
5048 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5049 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5050 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5051 | var_virtual0 == var_s; | ||
5052 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5053 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5054 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5055 | var_virtual1 == var_s; | ||
5056 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5057 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5058 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5059 | var_virtual2 == var_s; | ||
5060 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
5061 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
5062 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
5063 | } | ||
5064 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
5065 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5066 | var_s) | ||
5067 | { | ||
5068 | find interpretation(problem,interpretation); | ||
5069 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5070 | // s is exported | ||
5071 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5072 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5073 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5074 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
5075 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5076 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5077 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5078 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
5079 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5080 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5081 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5082 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
5083 | var_t1 != var_t2; | ||
5084 | var_t2 != var_t3; | ||
5085 | var_t1 != var_t3; | ||
5086 | }or{ | ||
5087 | find interpretation(problem,interpretation); | ||
5088 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5089 | // s is exported | ||
5090 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5091 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5092 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5093 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
5094 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5095 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5096 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5097 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
5098 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5099 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5100 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5101 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
5102 | var_t1 != var_t2; | ||
5103 | var_t2 != var_t3; | ||
5104 | var_t1 != var_t3; | ||
5105 | } | ||
5106 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
5107 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5108 | var_s) | ||
5109 | { | ||
5110 | find interpretation(problem,interpretation); | ||
5111 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5112 | // s is exported | ||
5113 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5114 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5115 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5116 | var_virtual0 == var_s; | ||
5117 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5118 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5119 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5120 | var_virtual1 == var_s; | ||
5121 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5122 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5123 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5124 | var_virtual2 == var_s; | ||
5125 | var_t1 != var_t2; | ||
5126 | var_t2 != var_t3; | ||
5127 | var_t1 != var_t3; | ||
5128 | }or{ | ||
5129 | find interpretation(problem,interpretation); | ||
5130 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5131 | // s is exported | ||
5132 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5133 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5134 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5135 | var_virtual0 == var_s; | ||
5136 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5137 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5138 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5139 | var_virtual1 == var_s; | ||
5140 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5141 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5142 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5143 | var_virtual2 == var_s; | ||
5144 | var_t1 != var_t2; | ||
5145 | var_t2 != var_t3; | ||
5146 | var_t1 != var_t3; | ||
5147 | } | ||
5148 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
5149 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
5150 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5151 | var_s1, var_s2) | ||
5152 | { | ||
5153 | find interpretation(problem,interpretation); | ||
5154 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5155 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5156 | // s1 is exported | ||
5157 | // s2 is exported | ||
5158 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5159 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5160 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
5161 | } | ||
5162 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
5163 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5164 | var_s1, var_s2) | ||
5165 | { | ||
5166 | find interpretation(problem,interpretation); | ||
5167 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5168 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5169 | // s1 is exported | ||
5170 | // s2 is exported | ||
5171 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5172 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5173 | var_s1 != var_s2; | ||
5174 | } | ||
5175 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
5176 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5177 | var_s1, var_s2) | ||
5178 | { | ||
5179 | find interpretation(problem,interpretation); | ||
5180 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5181 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5182 | // s1 is exported | ||
5183 | // s2 is exported | ||
5184 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5185 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5186 | var_s1 != var_s2; | ||
5187 | } | ||
5188 | |||
5189 | ////////// | ||
5190 | // 1.4 Containment Indexer | ||
5191 | ////////// | ||
5192 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
5193 | find mustContains4(_,_,source,target); | ||
5194 | } | ||
5195 | |||
5196 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5197 | source: DefinedElement, target: DefinedElement) | ||
5198 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
5199 | |||
5200 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
5201 | |||
5202 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
5203 | |||
5204 | private pattern mustTransitiveContains(source,target) { | ||
5205 | find mustContains2+(source,target); | ||
5206 | } | ||
5207 | |||
5208 | ////////// | ||
5209 | // 2. Invalidation Indexers | ||
5210 | ////////// | ||
5211 | // 2.1 Invalidated by WF Queries | ||
5212 | ////////// | ||
5213 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5214 | var_r1) | ||
5215 | { | ||
5216 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
5217 | } | ||
5218 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5219 | var_r) | ||
5220 | { | ||
5221 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
5222 | } | ||
5223 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5224 | var_t, var_e) | ||
5225 | { | ||
5226 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
5227 | } | ||
5228 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5229 | var_e) | ||
5230 | { | ||
5231 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
5232 | } | ||
5233 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5234 | var_e, var_t1, var_t2) | ||
5235 | { | ||
5236 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
5237 | } | ||
5238 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5239 | var_t, var_e) | ||
5240 | { | ||
5241 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
5242 | } | ||
5243 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5244 | var_t, var_f) | ||
5245 | { | ||
5246 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
5247 | } | ||
5248 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5249 | var_region) | ||
5250 | { | ||
5251 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
5252 | } | ||
5253 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5254 | var_c) | ||
5255 | { | ||
5256 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
5257 | } | ||
5258 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5259 | var_c) | ||
5260 | { | ||
5261 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
5262 | } | ||
5263 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5264 | var_s) | ||
5265 | { | ||
5266 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
5267 | } | ||
5268 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5269 | var_s) | ||
5270 | { | ||
5271 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
5272 | } | ||
5273 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5274 | var_s, var_v1, var_v2) | ||
5275 | { | ||
5276 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
5277 | } | ||
5278 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5279 | var_s) | ||
5280 | { | ||
5281 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
5282 | } | ||
5283 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5284 | var_s, var_v1, var_v2) | ||
5285 | { | ||
5286 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
5287 | } | ||
5288 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5289 | var_s, var_v) | ||
5290 | { | ||
5291 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
5292 | } | ||
5293 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5294 | var_s) | ||
5295 | { | ||
5296 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
5297 | } | ||
5298 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5299 | var_s1, var_s2) | ||
5300 | { | ||
5301 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
5302 | } | ||
5303 | |||
5304 | ////////// | ||
5305 | // 3. Unfinishedness Indexers | ||
5306 | ////////// | ||
5307 | // 3.1 Unfinishedness Measured by Multiplicity | ||
5308 | ////////// | ||
5309 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
5310 | find interpretation(problem,interpretation); | ||
5311 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
5312 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
5313 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
5314 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
5315 | check(numberOfExistingReferences < 1); | ||
5316 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
5317 | } | ||
5318 | |||
5319 | ////////// | ||
5320 | // 3.2 Unfinishedness Measured by WF Queries | ||
5321 | ////////// | ||
5322 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5323 | var_r1) | ||
5324 | { | ||
5325 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
5326 | } | ||
5327 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5328 | var_r) | ||
5329 | { | ||
5330 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
5331 | } | ||
5332 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5333 | var_t, var_e) | ||
5334 | { | ||
5335 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
5336 | } | ||
5337 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5338 | var_e) | ||
5339 | { | ||
5340 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
5341 | } | ||
5342 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5343 | var_e, var_t1, var_t2) | ||
5344 | { | ||
5345 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
5346 | } | ||
5347 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5348 | var_t, var_e) | ||
5349 | { | ||
5350 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
5351 | } | ||
5352 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5353 | var_t, var_f) | ||
5354 | { | ||
5355 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
5356 | } | ||
5357 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5358 | var_region) | ||
5359 | { | ||
5360 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
5361 | } | ||
5362 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5363 | var_c) | ||
5364 | { | ||
5365 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
5366 | } | ||
5367 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5368 | var_c) | ||
5369 | { | ||
5370 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
5371 | } | ||
5372 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5373 | var_s) | ||
5374 | { | ||
5375 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
5376 | } | ||
5377 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5378 | var_s) | ||
5379 | { | ||
5380 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
5381 | } | ||
5382 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5383 | var_s, var_v1, var_v2) | ||
5384 | { | ||
5385 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
5386 | } | ||
5387 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5388 | var_s) | ||
5389 | { | ||
5390 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
5391 | } | ||
5392 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5393 | var_s, var_v1, var_v2) | ||
5394 | { | ||
5395 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
5396 | } | ||
5397 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5398 | var_s, var_v) | ||
5399 | { | ||
5400 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
5401 | } | ||
5402 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5403 | var_s) | ||
5404 | { | ||
5405 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
5406 | } | ||
5407 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5408 | var_s1, var_s2) | ||
5409 | { | ||
5410 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
5411 | } | ||
5412 | |||
5413 | ////////// | ||
5414 | // 4. Refinement Indexers | ||
5415 | ////////// | ||
5416 | // 4.1 Object constructors | ||
5417 | ////////// | ||
5418 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
5419 | { | ||
5420 | find interpretation(problem,interpretation); | ||
5421 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
5422 | find mustExist(problem, interpretation, root); | ||
5423 | }or{ | ||
5424 | find interpretation(problem,interpretation); | ||
5425 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
5426 | find mustExist(problem, interpretation, root); | ||
5427 | }or{ | ||
5428 | find interpretation(problem,interpretation); | ||
5429 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
5430 | find mustExist(problem, interpretation, root); | ||
5431 | }or{ | ||
5432 | find interpretation(problem,interpretation); | ||
5433 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
5434 | find mustExist(problem, interpretation, root); | ||
5435 | }or{ | ||
5436 | find interpretation(problem,interpretation); | ||
5437 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
5438 | find mustExist(problem, interpretation, root); | ||
5439 | }or{ | ||
5440 | find interpretation(problem,interpretation); | ||
5441 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
5442 | find mustExist(problem, interpretation, root); | ||
5443 | }or{ | ||
5444 | find interpretation(problem,interpretation); | ||
5445 | find mustInstanceOfState_class(problem,interpretation,root); | ||
5446 | find mustExist(problem, interpretation, root); | ||
5447 | }or{ | ||
5448 | find interpretation(problem,interpretation); | ||
5449 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
5450 | find mustExist(problem, interpretation, root); | ||
5451 | }or{ | ||
5452 | find interpretation(problem,interpretation); | ||
5453 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
5454 | find mustExist(problem, interpretation, root); | ||
5455 | }or{ | ||
5456 | find interpretation(problem,interpretation); | ||
5457 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
5458 | find mustExist(problem, interpretation, root); | ||
5459 | }or{ | ||
5460 | find interpretation(problem,interpretation); | ||
5461 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
5462 | find mustExist(problem, interpretation, root); | ||
5463 | }or{ | ||
5464 | find interpretation(problem,interpretation); | ||
5465 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
5466 | find mustExist(problem, interpretation, root); | ||
5467 | }or{ | ||
5468 | find interpretation(problem,interpretation); | ||
5469 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
5470 | find mustExist(problem, interpretation, root); | ||
5471 | }or{ | ||
5472 | find interpretation(problem,interpretation); | ||
5473 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
5474 | find mustExist(problem, interpretation, root); | ||
5475 | }or{ | ||
5476 | find interpretation(problem,interpretation); | ||
5477 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
5478 | find mustExist(problem, interpretation, root); | ||
5479 | }or{ | ||
5480 | find interpretation(problem,interpretation); | ||
5481 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
5482 | find mustExist(problem, interpretation, root); | ||
5483 | }or{ | ||
5484 | find interpretation(problem,interpretation); | ||
5485 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
5486 | find mustExist(problem, interpretation, root); | ||
5487 | } | ||
5488 | pattern createObject_Statechart_class_UndefinedPart( | ||
5489 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5490 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5491 | { | ||
5492 | find interpretation(problem,interpretation); | ||
5493 | neg find hasElementInContainment(problem,interpretation); | ||
5494 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5495 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
5496 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
5497 | find mayExist(problem, interpretation, newObject); | ||
5498 | neg find mustExist(problem, interpretation, newObject); | ||
5499 | } | ||
5500 | pattern createObject_State_class_by_vertices_reference_Region( | ||
5501 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5502 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5503 | container:DefinedElement) | ||
5504 | { | ||
5505 | find interpretation(problem,interpretation); | ||
5506 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5507 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
5508 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5509 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5510 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5511 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
5512 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5513 | find mustExist(problem, interpretation, container); | ||
5514 | neg find mustExist(problem, interpretation, newObject); | ||
5515 | } | ||
5516 | pattern createObject_State_class( | ||
5517 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5518 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5519 | { | ||
5520 | find interpretation(problem,interpretation); | ||
5521 | neg find hasElementInContainment(problem,interpretation); | ||
5522 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5523 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
5524 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
5525 | find mayExist(problem, interpretation, newObject); | ||
5526 | neg find mustExist(problem, interpretation, newObject); | ||
5527 | } | ||
5528 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
5529 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5530 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5531 | container:DefinedElement) | ||
5532 | { | ||
5533 | find interpretation(problem,interpretation); | ||
5534 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5535 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
5536 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5537 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
5538 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5539 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
5540 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
5541 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
5542 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
5543 | find mustExist(problem, interpretation, container); | ||
5544 | neg find mustExist(problem, interpretation, newObject); | ||
5545 | } | ||
5546 | pattern createObject_Transition_class( | ||
5547 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5548 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5549 | { | ||
5550 | find interpretation(problem,interpretation); | ||
5551 | neg find hasElementInContainment(problem,interpretation); | ||
5552 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5553 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
5554 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
5555 | find mayExist(problem, interpretation, newObject); | ||
5556 | neg find mustExist(problem, interpretation, newObject); | ||
5557 | } | ||
5558 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
5559 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5560 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5561 | container:DefinedElement) | ||
5562 | { | ||
5563 | find interpretation(problem,interpretation); | ||
5564 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5565 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
5566 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5567 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5568 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5569 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
5570 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5571 | find mustExist(problem, interpretation, container); | ||
5572 | neg find mustExist(problem, interpretation, newObject); | ||
5573 | } | ||
5574 | pattern createObject_Synchronization_class( | ||
5575 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5576 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5577 | { | ||
5578 | find interpretation(problem,interpretation); | ||
5579 | neg find hasElementInContainment(problem,interpretation); | ||
5580 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5581 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
5582 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
5583 | find mayExist(problem, interpretation, newObject); | ||
5584 | neg find mustExist(problem, interpretation, newObject); | ||
5585 | } | ||
5586 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
5587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5588 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5589 | container:DefinedElement) | ||
5590 | { | ||
5591 | find interpretation(problem,interpretation); | ||
5592 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5593 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
5594 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5595 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5596 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5597 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
5598 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5599 | find mustExist(problem, interpretation, container); | ||
5600 | neg find mustExist(problem, interpretation, newObject); | ||
5601 | } | ||
5602 | pattern createObject_Exit_class( | ||
5603 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5604 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5605 | { | ||
5606 | find interpretation(problem,interpretation); | ||
5607 | neg find hasElementInContainment(problem,interpretation); | ||
5608 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5609 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
5610 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
5611 | find mayExist(problem, interpretation, newObject); | ||
5612 | neg find mustExist(problem, interpretation, newObject); | ||
5613 | } | ||
5614 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
5615 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5616 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5617 | container:DefinedElement) | ||
5618 | { | ||
5619 | find interpretation(problem,interpretation); | ||
5620 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5621 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
5622 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5623 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5624 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5625 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
5626 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5627 | find mustExist(problem, interpretation, container); | ||
5628 | neg find mustExist(problem, interpretation, newObject); | ||
5629 | } | ||
5630 | pattern createObject_Choice_class( | ||
5631 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5632 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5633 | { | ||
5634 | find interpretation(problem,interpretation); | ||
5635 | neg find hasElementInContainment(problem,interpretation); | ||
5636 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5637 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
5638 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
5639 | find mayExist(problem, interpretation, newObject); | ||
5640 | neg find mustExist(problem, interpretation, newObject); | ||
5641 | } | ||
5642 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
5643 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5644 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5645 | container:DefinedElement) | ||
5646 | { | ||
5647 | find interpretation(problem,interpretation); | ||
5648 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5649 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
5650 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5651 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5652 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5653 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
5654 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5655 | find mustExist(problem, interpretation, container); | ||
5656 | neg find mustExist(problem, interpretation, newObject); | ||
5657 | } | ||
5658 | pattern createObject_FinalState_class( | ||
5659 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5660 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5661 | { | ||
5662 | find interpretation(problem,interpretation); | ||
5663 | neg find hasElementInContainment(problem,interpretation); | ||
5664 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5665 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
5666 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
5667 | find mayExist(problem, interpretation, newObject); | ||
5668 | neg find mustExist(problem, interpretation, newObject); | ||
5669 | } | ||
5670 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
5671 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5672 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5673 | container:DefinedElement) | ||
5674 | { | ||
5675 | find interpretation(problem,interpretation); | ||
5676 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5677 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
5678 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5679 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
5680 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
5681 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
5682 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
5683 | find mustExist(problem, interpretation, container); | ||
5684 | neg find mustExist(problem, interpretation, newObject); | ||
5685 | } | ||
5686 | pattern createObject_Region_class( | ||
5687 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5688 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5689 | { | ||
5690 | find interpretation(problem,interpretation); | ||
5691 | neg find hasElementInContainment(problem,interpretation); | ||
5692 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5693 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
5694 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
5695 | find mayExist(problem, interpretation, newObject); | ||
5696 | neg find mustExist(problem, interpretation, newObject); | ||
5697 | } | ||
5698 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
5699 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5700 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5701 | container:DefinedElement) | ||
5702 | { | ||
5703 | find interpretation(problem,interpretation); | ||
5704 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5705 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
5706 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5707 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5708 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5709 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
5710 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5711 | find mustExist(problem, interpretation, container); | ||
5712 | neg find mustExist(problem, interpretation, newObject); | ||
5713 | } | ||
5714 | pattern createObject_Entry_class( | ||
5715 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5716 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5717 | { | ||
5718 | find interpretation(problem,interpretation); | ||
5719 | neg find hasElementInContainment(problem,interpretation); | ||
5720 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5721 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
5722 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
5723 | find mayExist(problem, interpretation, newObject); | ||
5724 | neg find mustExist(problem, interpretation, newObject); | ||
5725 | } | ||
5726 | |||
5727 | ////////// | ||
5728 | // 4.2 Type refinement | ||
5729 | ////////// | ||
5730 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5731 | find interpretation(problem,interpretation); | ||
5732 | PartialInterpretation.newElements(interpretation,element); | ||
5733 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
5734 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
5735 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5736 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5737 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
5738 | } | ||
5739 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5740 | find interpretation(problem,interpretation); | ||
5741 | PartialInterpretation.newElements(interpretation,element); | ||
5742 | find mayInstanceOfState_class(problem,interpretation,element); | ||
5743 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
5744 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
5745 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5746 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
5747 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5748 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
5749 | } | ||
5750 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5751 | find interpretation(problem,interpretation); | ||
5752 | PartialInterpretation.newElements(interpretation,element); | ||
5753 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
5754 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5755 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5756 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5757 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
5758 | } | ||
5759 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5760 | find interpretation(problem,interpretation); | ||
5761 | PartialInterpretation.newElements(interpretation,element); | ||
5762 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
5763 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5764 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
5765 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
5766 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
5767 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5768 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5769 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
5770 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
5771 | } | ||
5772 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5773 | find interpretation(problem,interpretation); | ||
5774 | PartialInterpretation.newElements(interpretation,element); | ||
5775 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
5776 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
5777 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5778 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
5779 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
5780 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5781 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5782 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
5783 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
5784 | } | ||
5785 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5786 | find interpretation(problem,interpretation); | ||
5787 | PartialInterpretation.newElements(interpretation,element); | ||
5788 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
5789 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5790 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
5791 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
5792 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
5793 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5794 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5795 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
5796 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
5797 | } | ||
5798 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5799 | find interpretation(problem,interpretation); | ||
5800 | PartialInterpretation.newElements(interpretation,element); | ||
5801 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
5802 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
5803 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5804 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5805 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
5806 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5807 | } | ||
5808 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5809 | find interpretation(problem,interpretation); | ||
5810 | PartialInterpretation.newElements(interpretation,element); | ||
5811 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
5812 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5813 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5814 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5815 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
5816 | } | ||
5817 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5818 | find interpretation(problem,interpretation); | ||
5819 | PartialInterpretation.newElements(interpretation,element); | ||
5820 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
5821 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
5822 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5823 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
5824 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
5825 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5826 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5827 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
5828 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
5829 | } | ||
5830 | |||
5831 | ////////// | ||
5832 | // 4.3 Relation refinement | ||
5833 | ////////// | ||
5834 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
5835 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5836 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
5837 | from: DefinedElement, to: DefinedElement) | ||
5838 | { | ||
5839 | find interpretation(problem,interpretation); | ||
5840 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
5841 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
5842 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
5843 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
5844 | find mustExist(problem, interpretation, from); | ||
5845 | find mustExist(problem, interpretation, to); | ||
5846 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
5847 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
5848 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
5849 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
5850 | } | ||
5851 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
5852 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
5853 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
5854 | |||
5855 | ////////// | ||
5856 | // 0. Util | ||
5857 | ////////// | ||
5858 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5859 | PartialInterpretation.problem(interpretation,problem); | ||
5860 | } | ||
5861 | |||
5862 | ///////////////////////// | ||
5863 | // 0.1 Existence | ||
5864 | ///////////////////////// | ||
5865 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5866 | find interpretation(problem,interpretation); | ||
5867 | LogicProblem.elements(problem,element); | ||
5868 | } or { | ||
5869 | find interpretation(problem,interpretation); | ||
5870 | PartialInterpretation.newElements(interpretation,element); | ||
5871 | } | ||
5872 | |||
5873 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5874 | find mustExist(problem,interpretation,element); | ||
5875 | } or { | ||
5876 | find interpretation(problem,interpretation); | ||
5877 | neg find elementCloseWorld(element); | ||
5878 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5879 | } | ||
5880 | |||
5881 | private pattern elementCloseWorld(element:DefinedElement) { | ||
5882 | PartialInterpretation.openWorldElements(i,element); | ||
5883 | PartialInterpretation.maxNewElements(i,0); | ||
5884 | } or { | ||
5885 | Scope.targetTypeInterpretation(scope,interpretation); | ||
5886 | PartialTypeInterpratation.elements(interpretation,element); | ||
5887 | Scope.maxNewElements(scope,0); | ||
5888 | } | ||
5889 | |||
5890 | //////////////////////// | ||
5891 | // 0.2 Equivalence | ||
5892 | //////////////////////// | ||
5893 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
5894 | find mayExist(problem,interpretation,a); | ||
5895 | find mayExist(problem,interpretation,b); | ||
5896 | a == b; | ||
5897 | } | ||
5898 | |||
5899 | //////////////////////// | ||
5900 | // 0.3 Required Patterns by TypeIndexer | ||
5901 | //////////////////////// | ||
5902 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
5903 | find interpretation(problem,interpretation); | ||
5904 | LogicProblem.types(problem,type); | ||
5905 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5906 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5907 | } | ||
5908 | |||
5909 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
5910 | find interpretation(problem,interpretation); | ||
5911 | LogicProblem.types(problem,type); | ||
5912 | TypeDefinition.elements(type,element); | ||
5913 | } or { | ||
5914 | find interpretation(problem,interpretation); | ||
5915 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
5916 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
5917 | } | ||
5918 | |||
5919 | private pattern isPrimitive(element: PrimitiveElement) { | ||
5920 | PrimitiveElement(element); | ||
5921 | } | ||
5922 | |||
5923 | ////////// | ||
5924 | // 1. Problem-Specific Base Indexers | ||
5925 | ////////// | ||
5926 | // 1.1 Type Indexers | ||
5927 | ////////// | ||
5928 | // 1.1.1 primitive Type Indexers | ||
5929 | ////////// | ||
5930 | |||
5931 | ////////// | ||
5932 | // 1.1.2 domain-specific Type Indexers | ||
5933 | ////////// | ||
5934 | /** | ||
5935 | * An element must be an instance of type "Pseudostate class". | ||
5936 | */ | ||
5937 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5938 | Type.name(type,"Pseudostate class"); | ||
5939 | find directInstanceOf(problem,interpretation,element,type); | ||
5940 | } | ||
5941 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5942 | find interpretation(problem,interpretation); | ||
5943 | PartialInterpretation.scopes(interpretation,scope); | ||
5944 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5945 | Scope.maxNewElements(scope,0); | ||
5946 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5947 | Type.name(type,"Pseudostate class"); | ||
5948 | } | ||
5949 | |||
5950 | /** | ||
5951 | * An element may be an instance of type "Pseudostate class". | ||
5952 | */ | ||
5953 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
5954 | { | ||
5955 | find interpretation(problem,interpretation); | ||
5956 | PartialInterpretation.newElements(interpretation,element); | ||
5957 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5958 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
5959 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
5960 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
5961 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
5962 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5963 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
5964 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5965 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
5966 | neg find isPrimitive(element); | ||
5967 | } or { | ||
5968 | find interpretation(problem,interpretation); | ||
5969 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5970 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
5971 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
5972 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
5973 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
5974 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
5975 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
5976 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
5977 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
5978 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
5979 | neg find isPrimitive(element); | ||
5980 | } or | ||
5981 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
5982 | /** | ||
5983 | * An element must be an instance of type "Vertex class". | ||
5984 | */ | ||
5985 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5986 | Type.name(type,"Vertex class"); | ||
5987 | find directInstanceOf(problem,interpretation,element,type); | ||
5988 | } | ||
5989 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5990 | find interpretation(problem,interpretation); | ||
5991 | PartialInterpretation.scopes(interpretation,scope); | ||
5992 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5993 | Scope.maxNewElements(scope,0); | ||
5994 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5995 | Type.name(type,"Vertex class"); | ||
5996 | } | ||
5997 | |||
5998 | /** | ||
5999 | * An element may be an instance of type "Vertex class". | ||
6000 | */ | ||
6001 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6002 | { | ||
6003 | find interpretation(problem,interpretation); | ||
6004 | PartialInterpretation.newElements(interpretation,element); | ||
6005 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6006 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6007 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6008 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6009 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6010 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
6011 | neg find isPrimitive(element); | ||
6012 | } or { | ||
6013 | find interpretation(problem,interpretation); | ||
6014 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6015 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6016 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6017 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6018 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6019 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6020 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
6021 | neg find isPrimitive(element); | ||
6022 | } or | ||
6023 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
6024 | /** | ||
6025 | * An element must be an instance of type "Region class". | ||
6026 | */ | ||
6027 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6028 | Type.name(type,"Region class"); | ||
6029 | find directInstanceOf(problem,interpretation,element,type); | ||
6030 | } | ||
6031 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6032 | find interpretation(problem,interpretation); | ||
6033 | PartialInterpretation.scopes(interpretation,scope); | ||
6034 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6035 | Scope.maxNewElements(scope,0); | ||
6036 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6037 | Type.name(type,"Region class"); | ||
6038 | } | ||
6039 | |||
6040 | /** | ||
6041 | * An element may be an instance of type "Region class". | ||
6042 | */ | ||
6043 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6044 | { | ||
6045 | find interpretation(problem,interpretation); | ||
6046 | PartialInterpretation.newElements(interpretation,element); | ||
6047 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6048 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6049 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6050 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
6051 | neg find isPrimitive(element); | ||
6052 | } or { | ||
6053 | find interpretation(problem,interpretation); | ||
6054 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6055 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6056 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6057 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6058 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
6059 | neg find isPrimitive(element); | ||
6060 | } or | ||
6061 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
6062 | /** | ||
6063 | * An element must be an instance of type "Transition class". | ||
6064 | */ | ||
6065 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6066 | Type.name(type,"Transition class"); | ||
6067 | find directInstanceOf(problem,interpretation,element,type); | ||
6068 | } | ||
6069 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6070 | find interpretation(problem,interpretation); | ||
6071 | PartialInterpretation.scopes(interpretation,scope); | ||
6072 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6073 | Scope.maxNewElements(scope,0); | ||
6074 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6075 | Type.name(type,"Transition class"); | ||
6076 | } | ||
6077 | |||
6078 | /** | ||
6079 | * An element may be an instance of type "Transition class". | ||
6080 | */ | ||
6081 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6082 | { | ||
6083 | find interpretation(problem,interpretation); | ||
6084 | PartialInterpretation.newElements(interpretation,element); | ||
6085 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6086 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6087 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6088 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
6089 | neg find isPrimitive(element); | ||
6090 | } or { | ||
6091 | find interpretation(problem,interpretation); | ||
6092 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6093 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6094 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6095 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6096 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
6097 | neg find isPrimitive(element); | ||
6098 | } or | ||
6099 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
6100 | /** | ||
6101 | * An element must be an instance of type "Statechart class". | ||
6102 | */ | ||
6103 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6104 | Type.name(type,"Statechart class"); | ||
6105 | find directInstanceOf(problem,interpretation,element,type); | ||
6106 | } | ||
6107 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6108 | find interpretation(problem,interpretation); | ||
6109 | PartialInterpretation.scopes(interpretation,scope); | ||
6110 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6111 | Scope.maxNewElements(scope,0); | ||
6112 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6113 | Type.name(type,"Statechart class"); | ||
6114 | } | ||
6115 | |||
6116 | /** | ||
6117 | * An element may be an instance of type "Statechart class". | ||
6118 | */ | ||
6119 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6120 | { | ||
6121 | find interpretation(problem,interpretation); | ||
6122 | PartialInterpretation.newElements(interpretation,element); | ||
6123 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6124 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6125 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6126 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6127 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
6128 | neg find isPrimitive(element); | ||
6129 | } or { | ||
6130 | find interpretation(problem,interpretation); | ||
6131 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6132 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6133 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6134 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6135 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6136 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
6137 | neg find isPrimitive(element); | ||
6138 | } or | ||
6139 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
6140 | /** | ||
6141 | * An element must be an instance of type "Entry class". | ||
6142 | */ | ||
6143 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6144 | Type.name(type,"Entry class"); | ||
6145 | find directInstanceOf(problem,interpretation,element,type); | ||
6146 | } | ||
6147 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6148 | find interpretation(problem,interpretation); | ||
6149 | PartialInterpretation.scopes(interpretation,scope); | ||
6150 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6151 | Scope.maxNewElements(scope,0); | ||
6152 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6153 | Type.name(type,"Entry class"); | ||
6154 | } | ||
6155 | |||
6156 | /** | ||
6157 | * An element may be an instance of type "Entry class". | ||
6158 | */ | ||
6159 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6160 | { | ||
6161 | find interpretation(problem,interpretation); | ||
6162 | PartialInterpretation.newElements(interpretation,element); | ||
6163 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6164 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6165 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6166 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6167 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6168 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6169 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6170 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
6171 | neg find isPrimitive(element); | ||
6172 | } or { | ||
6173 | find interpretation(problem,interpretation); | ||
6174 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6175 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6176 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6177 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6178 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6179 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6180 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6181 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6182 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
6183 | neg find isPrimitive(element); | ||
6184 | } or | ||
6185 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
6186 | /** | ||
6187 | * An element must be an instance of type "Synchronization class". | ||
6188 | */ | ||
6189 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6190 | Type.name(type,"Synchronization class"); | ||
6191 | find directInstanceOf(problem,interpretation,element,type); | ||
6192 | } | ||
6193 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6194 | find interpretation(problem,interpretation); | ||
6195 | PartialInterpretation.scopes(interpretation,scope); | ||
6196 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6197 | Scope.maxNewElements(scope,0); | ||
6198 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6199 | Type.name(type,"Synchronization class"); | ||
6200 | } | ||
6201 | |||
6202 | /** | ||
6203 | * An element may be an instance of type "Synchronization class". | ||
6204 | */ | ||
6205 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6206 | { | ||
6207 | find interpretation(problem,interpretation); | ||
6208 | PartialInterpretation.newElements(interpretation,element); | ||
6209 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6210 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6211 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6212 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6213 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6214 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6215 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6216 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
6217 | neg find isPrimitive(element); | ||
6218 | } or { | ||
6219 | find interpretation(problem,interpretation); | ||
6220 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6221 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6222 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6223 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6224 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6225 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6226 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6227 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6228 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
6229 | neg find isPrimitive(element); | ||
6230 | } or | ||
6231 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
6232 | /** | ||
6233 | * An element must be an instance of type "State class". | ||
6234 | */ | ||
6235 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6236 | Type.name(type,"State class"); | ||
6237 | find directInstanceOf(problem,interpretation,element,type); | ||
6238 | } | ||
6239 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6240 | find interpretation(problem,interpretation); | ||
6241 | PartialInterpretation.scopes(interpretation,scope); | ||
6242 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6243 | Scope.maxNewElements(scope,0); | ||
6244 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6245 | Type.name(type,"State class"); | ||
6246 | } | ||
6247 | |||
6248 | /** | ||
6249 | * An element may be an instance of type "State class". | ||
6250 | */ | ||
6251 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6252 | { | ||
6253 | find interpretation(problem,interpretation); | ||
6254 | PartialInterpretation.newElements(interpretation,element); | ||
6255 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6256 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6257 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6258 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6259 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6260 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
6261 | neg find isPrimitive(element); | ||
6262 | } or { | ||
6263 | find interpretation(problem,interpretation); | ||
6264 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6265 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6266 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6267 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6268 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6269 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6270 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
6271 | neg find isPrimitive(element); | ||
6272 | } or | ||
6273 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
6274 | /** | ||
6275 | * An element must be an instance of type "RegularState class". | ||
6276 | */ | ||
6277 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6278 | Type.name(type,"RegularState class"); | ||
6279 | find directInstanceOf(problem,interpretation,element,type); | ||
6280 | } | ||
6281 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6282 | find interpretation(problem,interpretation); | ||
6283 | PartialInterpretation.scopes(interpretation,scope); | ||
6284 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6285 | Scope.maxNewElements(scope,0); | ||
6286 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6287 | Type.name(type,"RegularState class"); | ||
6288 | } | ||
6289 | |||
6290 | /** | ||
6291 | * An element may be an instance of type "RegularState class". | ||
6292 | */ | ||
6293 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6294 | { | ||
6295 | find interpretation(problem,interpretation); | ||
6296 | PartialInterpretation.newElements(interpretation,element); | ||
6297 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6298 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6299 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6300 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6301 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6302 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
6303 | neg find isPrimitive(element); | ||
6304 | } or { | ||
6305 | find interpretation(problem,interpretation); | ||
6306 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6307 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6308 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6309 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6310 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6311 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6312 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
6313 | neg find isPrimitive(element); | ||
6314 | } or | ||
6315 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
6316 | /** | ||
6317 | * An element must be an instance of type "CompositeElement class". | ||
6318 | */ | ||
6319 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6320 | Type.name(type,"CompositeElement class"); | ||
6321 | find directInstanceOf(problem,interpretation,element,type); | ||
6322 | } | ||
6323 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6324 | find interpretation(problem,interpretation); | ||
6325 | PartialInterpretation.scopes(interpretation,scope); | ||
6326 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6327 | Scope.maxNewElements(scope,0); | ||
6328 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6329 | Type.name(type,"CompositeElement class"); | ||
6330 | } | ||
6331 | |||
6332 | /** | ||
6333 | * An element may be an instance of type "CompositeElement class". | ||
6334 | */ | ||
6335 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6336 | { | ||
6337 | find interpretation(problem,interpretation); | ||
6338 | PartialInterpretation.newElements(interpretation,element); | ||
6339 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6340 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6341 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6342 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6343 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6344 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
6345 | neg find isPrimitive(element); | ||
6346 | } or { | ||
6347 | find interpretation(problem,interpretation); | ||
6348 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6349 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6350 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6351 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6352 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6353 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6354 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
6355 | neg find isPrimitive(element); | ||
6356 | } or | ||
6357 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
6358 | /** | ||
6359 | * An element must be an instance of type "Choice class". | ||
6360 | */ | ||
6361 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6362 | Type.name(type,"Choice class"); | ||
6363 | find directInstanceOf(problem,interpretation,element,type); | ||
6364 | } | ||
6365 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6366 | find interpretation(problem,interpretation); | ||
6367 | PartialInterpretation.scopes(interpretation,scope); | ||
6368 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6369 | Scope.maxNewElements(scope,0); | ||
6370 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6371 | Type.name(type,"Choice class"); | ||
6372 | } | ||
6373 | |||
6374 | /** | ||
6375 | * An element may be an instance of type "Choice class". | ||
6376 | */ | ||
6377 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6378 | { | ||
6379 | find interpretation(problem,interpretation); | ||
6380 | PartialInterpretation.newElements(interpretation,element); | ||
6381 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6382 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6383 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6384 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6385 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6386 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6387 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6388 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
6389 | neg find isPrimitive(element); | ||
6390 | } or { | ||
6391 | find interpretation(problem,interpretation); | ||
6392 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6393 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6394 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6395 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6396 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6397 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6398 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6399 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6400 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
6401 | neg find isPrimitive(element); | ||
6402 | } or | ||
6403 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
6404 | /** | ||
6405 | * An element must be an instance of type "Exit class". | ||
6406 | */ | ||
6407 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6408 | Type.name(type,"Exit class"); | ||
6409 | find directInstanceOf(problem,interpretation,element,type); | ||
6410 | } | ||
6411 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6412 | find interpretation(problem,interpretation); | ||
6413 | PartialInterpretation.scopes(interpretation,scope); | ||
6414 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6415 | Scope.maxNewElements(scope,0); | ||
6416 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6417 | Type.name(type,"Exit class"); | ||
6418 | } | ||
6419 | |||
6420 | /** | ||
6421 | * An element may be an instance of type "Exit class". | ||
6422 | */ | ||
6423 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6424 | { | ||
6425 | find interpretation(problem,interpretation); | ||
6426 | PartialInterpretation.newElements(interpretation,element); | ||
6427 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6428 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6429 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6430 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6431 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6432 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6433 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6434 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
6435 | neg find isPrimitive(element); | ||
6436 | } or { | ||
6437 | find interpretation(problem,interpretation); | ||
6438 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6439 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6440 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6441 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6442 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6443 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6444 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6445 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6446 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
6447 | neg find isPrimitive(element); | ||
6448 | } or | ||
6449 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
6450 | /** | ||
6451 | * An element must be an instance of type "FinalState class". | ||
6452 | */ | ||
6453 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6454 | Type.name(type,"FinalState class"); | ||
6455 | find directInstanceOf(problem,interpretation,element,type); | ||
6456 | } | ||
6457 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6458 | find interpretation(problem,interpretation); | ||
6459 | PartialInterpretation.scopes(interpretation,scope); | ||
6460 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6461 | Scope.maxNewElements(scope,0); | ||
6462 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6463 | Type.name(type,"FinalState class"); | ||
6464 | } | ||
6465 | |||
6466 | /** | ||
6467 | * An element may be an instance of type "FinalState class". | ||
6468 | */ | ||
6469 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6470 | { | ||
6471 | find interpretation(problem,interpretation); | ||
6472 | PartialInterpretation.newElements(interpretation,element); | ||
6473 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6474 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6475 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6476 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6477 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
6478 | neg find isPrimitive(element); | ||
6479 | } or { | ||
6480 | find interpretation(problem,interpretation); | ||
6481 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6482 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6483 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6484 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6485 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6486 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
6487 | neg find isPrimitive(element); | ||
6488 | } or | ||
6489 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
6490 | /** | ||
6491 | * An element must be an instance of type "Statechart class DefinedPart". | ||
6492 | */ | ||
6493 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6494 | Type.name(type,"Statechart class DefinedPart"); | ||
6495 | find directInstanceOf(problem,interpretation,element,type); | ||
6496 | } | ||
6497 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6498 | find interpretation(problem,interpretation); | ||
6499 | PartialInterpretation.scopes(interpretation,scope); | ||
6500 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6501 | Scope.maxNewElements(scope,0); | ||
6502 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6503 | Type.name(type,"Statechart class DefinedPart"); | ||
6504 | } | ||
6505 | |||
6506 | /** | ||
6507 | * An element may be an instance of type "Statechart class DefinedPart". | ||
6508 | */ | ||
6509 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6510 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
6511 | /** | ||
6512 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
6513 | */ | ||
6514 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6515 | Type.name(type,"Statechart class UndefinedPart"); | ||
6516 | find directInstanceOf(problem,interpretation,element,type); | ||
6517 | } | ||
6518 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6519 | find interpretation(problem,interpretation); | ||
6520 | PartialInterpretation.scopes(interpretation,scope); | ||
6521 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6522 | Scope.maxNewElements(scope,0); | ||
6523 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6524 | Type.name(type,"Statechart class UndefinedPart"); | ||
6525 | } | ||
6526 | |||
6527 | /** | ||
6528 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
6529 | */ | ||
6530 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6531 | { | ||
6532 | find interpretation(problem,interpretation); | ||
6533 | PartialInterpretation.newElements(interpretation,element); | ||
6534 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6535 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6536 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6537 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
6538 | neg find isPrimitive(element); | ||
6539 | } or { | ||
6540 | find interpretation(problem,interpretation); | ||
6541 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6542 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6543 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6544 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6545 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
6546 | neg find isPrimitive(element); | ||
6547 | } or | ||
6548 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
6549 | /** | ||
6550 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
6551 | */ | ||
6552 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6553 | Type.name(type,"CompositeElement class DefinedPart"); | ||
6554 | find directInstanceOf(problem,interpretation,element,type); | ||
6555 | } | ||
6556 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6557 | find interpretation(problem,interpretation); | ||
6558 | PartialInterpretation.scopes(interpretation,scope); | ||
6559 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6560 | Scope.maxNewElements(scope,0); | ||
6561 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6562 | Type.name(type,"CompositeElement class DefinedPart"); | ||
6563 | } | ||
6564 | |||
6565 | /** | ||
6566 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
6567 | */ | ||
6568 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6569 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
6570 | /** | ||
6571 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
6572 | */ | ||
6573 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6574 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
6575 | find directInstanceOf(problem,interpretation,element,type); | ||
6576 | } | ||
6577 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6578 | find interpretation(problem,interpretation); | ||
6579 | PartialInterpretation.scopes(interpretation,scope); | ||
6580 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6581 | Scope.maxNewElements(scope,0); | ||
6582 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6583 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
6584 | } | ||
6585 | |||
6586 | /** | ||
6587 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
6588 | */ | ||
6589 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6590 | { | ||
6591 | find interpretation(problem,interpretation); | ||
6592 | PartialInterpretation.newElements(interpretation,element); | ||
6593 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6594 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6595 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6596 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6597 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
6598 | neg find isPrimitive(element); | ||
6599 | } or { | ||
6600 | find interpretation(problem,interpretation); | ||
6601 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6602 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6603 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6604 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6605 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6606 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
6607 | neg find isPrimitive(element); | ||
6608 | } or | ||
6609 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
6610 | |||
6611 | ////////// | ||
6612 | // 1.2 Relation Declaration Indexers | ||
6613 | ////////// | ||
6614 | /** | ||
6615 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
6616 | */ | ||
6617 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
6618 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6619 | source: DefinedElement, target:DefinedElement) | ||
6620 | { | ||
6621 | find interpretation(problem,interpretation); | ||
6622 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6623 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
6624 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6625 | BinaryElementRelationLink.param1(link,source); | ||
6626 | BinaryElementRelationLink.param2(link,target); | ||
6627 | } | ||
6628 | /** | ||
6629 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
6630 | */ | ||
6631 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
6632 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6633 | source: DefinedElement, target:DefinedElement) | ||
6634 | { | ||
6635 | find interpretation(problem,interpretation); | ||
6636 | // The two endpoint of the link have to exist | ||
6637 | find mayExist(problem, interpretation, source); | ||
6638 | find mayExist(problem, interpretation, target); | ||
6639 | // Type consistency | ||
6640 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
6641 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
6642 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6643 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6644 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
6645 | check(numberOfExistingOppositeReferences < 1); | ||
6646 | } or { | ||
6647 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
6648 | } | ||
6649 | /** | ||
6650 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
6651 | */ | ||
6652 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
6653 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6654 | source: DefinedElement, target:DefinedElement) | ||
6655 | { | ||
6656 | find interpretation(problem,interpretation); | ||
6657 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6658 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
6659 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6660 | BinaryElementRelationLink.param1(link,source); | ||
6661 | BinaryElementRelationLink.param2(link,target); | ||
6662 | } | ||
6663 | /** | ||
6664 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
6665 | */ | ||
6666 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
6667 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6668 | source: DefinedElement, target:DefinedElement) | ||
6669 | { | ||
6670 | find interpretation(problem,interpretation); | ||
6671 | // The two endpoint of the link have to exist | ||
6672 | find mayExist(problem, interpretation, source); | ||
6673 | find mayExist(problem, interpretation, target); | ||
6674 | // Type consistency | ||
6675 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
6676 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
6677 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6678 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6679 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
6680 | check(numberOfExistingOppositeReferences < 1); | ||
6681 | // The reference is containment, then a new reference cannot be create if: | ||
6682 | // 1. Multiple parents | ||
6683 | neg find mustContains4(problem,interpretation,_,target); | ||
6684 | // 2. Circle in the containment hierarchy | ||
6685 | neg find mustTransitiveContains(source,target); | ||
6686 | } or { | ||
6687 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
6688 | } | ||
6689 | /** | ||
6690 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
6691 | */ | ||
6692 | private pattern mustInRelationvertices_reference_Region( | ||
6693 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6694 | source: DefinedElement, target:DefinedElement) | ||
6695 | { | ||
6696 | find interpretation(problem,interpretation); | ||
6697 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6698 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
6699 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6700 | BinaryElementRelationLink.param1(link,source); | ||
6701 | BinaryElementRelationLink.param2(link,target); | ||
6702 | } | ||
6703 | /** | ||
6704 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
6705 | */ | ||
6706 | private pattern mayInRelationvertices_reference_Region( | ||
6707 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6708 | source: DefinedElement, target:DefinedElement) | ||
6709 | { | ||
6710 | find interpretation(problem,interpretation); | ||
6711 | // The two endpoint of the link have to exist | ||
6712 | find mayExist(problem, interpretation, source); | ||
6713 | find mayExist(problem, interpretation, target); | ||
6714 | // Type consistency | ||
6715 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
6716 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
6717 | // The reference is containment, then a new reference cannot be create if: | ||
6718 | // 1. Multiple parents | ||
6719 | neg find mustContains4(problem,interpretation,_,target); | ||
6720 | // 2. Circle in the containment hierarchy | ||
6721 | neg find mustTransitiveContains(source,target); | ||
6722 | } or { | ||
6723 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
6724 | } | ||
6725 | /** | ||
6726 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
6727 | */ | ||
6728 | private pattern mustInRelationtarget_reference_Transition( | ||
6729 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6730 | source: DefinedElement, target:DefinedElement) | ||
6731 | { | ||
6732 | find interpretation(problem,interpretation); | ||
6733 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6734 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
6735 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6736 | BinaryElementRelationLink.param1(link,source); | ||
6737 | BinaryElementRelationLink.param2(link,target); | ||
6738 | } | ||
6739 | /** | ||
6740 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
6741 | */ | ||
6742 | private pattern mayInRelationtarget_reference_Transition( | ||
6743 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6744 | source: DefinedElement, target:DefinedElement) | ||
6745 | { | ||
6746 | find interpretation(problem,interpretation); | ||
6747 | // The two endpoint of the link have to exist | ||
6748 | find mayExist(problem, interpretation, source); | ||
6749 | find mayExist(problem, interpretation, target); | ||
6750 | // Type consistency | ||
6751 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
6752 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
6753 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6754 | // the upper bound of the multiplicity should be considered. | ||
6755 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
6756 | check(numberOfExistingReferences < 1); | ||
6757 | } or { | ||
6758 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
6759 | } | ||
6760 | /** | ||
6761 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
6762 | */ | ||
6763 | private pattern mustInRelationsource_reference_Transition( | ||
6764 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6765 | source: DefinedElement, target:DefinedElement) | ||
6766 | { | ||
6767 | find interpretation(problem,interpretation); | ||
6768 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6769 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
6770 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6771 | BinaryElementRelationLink.param1(link,source); | ||
6772 | BinaryElementRelationLink.param2(link,target); | ||
6773 | } | ||
6774 | /** | ||
6775 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
6776 | */ | ||
6777 | private pattern mayInRelationsource_reference_Transition( | ||
6778 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6779 | source: DefinedElement, target:DefinedElement) | ||
6780 | { | ||
6781 | find interpretation(problem,interpretation); | ||
6782 | // The two endpoint of the link have to exist | ||
6783 | find mayExist(problem, interpretation, source); | ||
6784 | find mayExist(problem, interpretation, target); | ||
6785 | // Type consistency | ||
6786 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
6787 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
6788 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6789 | // the upper bound of the multiplicity should be considered. | ||
6790 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
6791 | check(numberOfExistingReferences < 1); | ||
6792 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
6793 | // 1. Multiple parents | ||
6794 | neg find mustContains4(problem,interpretation,source,_); | ||
6795 | // 2. Circle in the containment hierarchy | ||
6796 | neg find mustTransitiveContains(source,target); | ||
6797 | } or { | ||
6798 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
6799 | } | ||
6800 | /** | ||
6801 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
6802 | */ | ||
6803 | private pattern mustInRelationregions_reference_CompositeElement( | ||
6804 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6805 | source: DefinedElement, target:DefinedElement) | ||
6806 | { | ||
6807 | find interpretation(problem,interpretation); | ||
6808 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6809 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
6810 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6811 | BinaryElementRelationLink.param1(link,source); | ||
6812 | BinaryElementRelationLink.param2(link,target); | ||
6813 | } | ||
6814 | /** | ||
6815 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
6816 | */ | ||
6817 | private pattern mayInRelationregions_reference_CompositeElement( | ||
6818 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6819 | source: DefinedElement, target:DefinedElement) | ||
6820 | { | ||
6821 | find interpretation(problem,interpretation); | ||
6822 | // The two endpoint of the link have to exist | ||
6823 | find mayExist(problem, interpretation, source); | ||
6824 | find mayExist(problem, interpretation, target); | ||
6825 | // Type consistency | ||
6826 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
6827 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
6828 | // The reference is containment, then a new reference cannot be create if: | ||
6829 | // 1. Multiple parents | ||
6830 | neg find mustContains4(problem,interpretation,_,target); | ||
6831 | // 2. Circle in the containment hierarchy | ||
6832 | neg find mustTransitiveContains(source,target); | ||
6833 | } or { | ||
6834 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
6835 | } | ||
6836 | |||
6837 | ////////// | ||
6838 | // 1.3 Relation Definition Indexers | ||
6839 | ////////// | ||
6840 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
6841 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
6842 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6843 | var_r1, var_e1) | ||
6844 | { | ||
6845 | find interpretation(problem,interpretation); | ||
6846 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6847 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
6848 | // r1 is exported | ||
6849 | // e1 is exported | ||
6850 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6851 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
6852 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
6853 | var_virtual0 == var_e1; | ||
6854 | } | ||
6855 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
6856 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6857 | var_r1, var_e1) | ||
6858 | { | ||
6859 | find interpretation(problem,interpretation); | ||
6860 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6861 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
6862 | // r1 is exported | ||
6863 | // e1 is exported | ||
6864 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6865 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
6866 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
6867 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
6868 | } | ||
6869 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
6870 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6871 | var_r1, var_e1) | ||
6872 | { | ||
6873 | find interpretation(problem,interpretation); | ||
6874 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6875 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
6876 | // r1 is exported | ||
6877 | // e1 is exported | ||
6878 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6879 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
6880 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
6881 | var_virtual0 == var_e1; | ||
6882 | } | ||
6883 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
6884 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
6885 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6886 | var_r1) | ||
6887 | { | ||
6888 | find interpretation(problem,interpretation); | ||
6889 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6890 | // r1 is exported | ||
6891 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
6892 | } | ||
6893 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
6894 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6895 | var_r1) | ||
6896 | { | ||
6897 | find interpretation(problem,interpretation); | ||
6898 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6899 | // r1 is exported | ||
6900 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
6901 | } | ||
6902 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
6903 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6904 | var_r1) | ||
6905 | { | ||
6906 | find interpretation(problem,interpretation); | ||
6907 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
6908 | // r1 is exported | ||
6909 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
6910 | } | ||
6911 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
6912 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
6913 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6914 | var_r) | ||
6915 | { | ||
6916 | find interpretation(problem,interpretation); | ||
6917 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
6918 | // r is exported | ||
6919 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
6920 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
6921 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
6922 | } | ||
6923 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
6924 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6925 | var_r) | ||
6926 | { | ||
6927 | find interpretation(problem,interpretation); | ||
6928 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
6929 | // r is exported | ||
6930 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
6931 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
6932 | var_e1 != var_e2; | ||
6933 | } | ||
6934 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
6935 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6936 | var_r) | ||
6937 | { | ||
6938 | find interpretation(problem,interpretation); | ||
6939 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
6940 | // r is exported | ||
6941 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
6942 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
6943 | var_e1 != var_e2; | ||
6944 | } | ||
6945 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
6946 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
6947 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6948 | var_t, var_src, var_trg) | ||
6949 | { | ||
6950 | find interpretation(problem,interpretation); | ||
6951 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
6952 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
6953 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
6954 | // t is exported | ||
6955 | // src is exported | ||
6956 | // trg is exported | ||
6957 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
6958 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
6959 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
6960 | var_virtual0 == var_src; | ||
6961 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
6962 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
6963 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
6964 | var_virtual1 == var_trg; | ||
6965 | } | ||
6966 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
6967 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6968 | var_t, var_src, var_trg) | ||
6969 | { | ||
6970 | find interpretation(problem,interpretation); | ||
6971 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
6972 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
6973 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
6974 | // t is exported | ||
6975 | // src is exported | ||
6976 | // trg is exported | ||
6977 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
6978 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
6979 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
6980 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
6981 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
6982 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
6983 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
6984 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
6985 | } | ||
6986 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
6987 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6988 | var_t, var_src, var_trg) | ||
6989 | { | ||
6990 | find interpretation(problem,interpretation); | ||
6991 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
6992 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
6993 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
6994 | // t is exported | ||
6995 | // src is exported | ||
6996 | // trg is exported | ||
6997 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
6998 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
6999 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7000 | var_virtual0 == var_src; | ||
7001 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7002 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
7003 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7004 | var_virtual1 == var_trg; | ||
7005 | } | ||
7006 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
7007 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
7008 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7009 | var_t, var_e) | ||
7010 | { | ||
7011 | find interpretation(problem,interpretation); | ||
7012 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7013 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7014 | // t is exported | ||
7015 | // e is exported | ||
7016 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
7017 | } | ||
7018 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
7019 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7020 | var_t, var_e) | ||
7021 | { | ||
7022 | find interpretation(problem,interpretation); | ||
7023 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7024 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7025 | // t is exported | ||
7026 | // e is exported | ||
7027 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
7028 | } | ||
7029 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
7030 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7031 | var_t, var_e) | ||
7032 | { | ||
7033 | find interpretation(problem,interpretation); | ||
7034 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7035 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7036 | // t is exported | ||
7037 | // e is exported | ||
7038 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
7039 | } | ||
7040 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
7041 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
7042 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7043 | var_e) | ||
7044 | { | ||
7045 | find interpretation(problem,interpretation); | ||
7046 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7047 | // e is exported | ||
7048 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
7049 | } | ||
7050 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
7051 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7052 | var_e) | ||
7053 | { | ||
7054 | find interpretation(problem,interpretation); | ||
7055 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7056 | // e is exported | ||
7057 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
7058 | } | ||
7059 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
7060 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7061 | var_e) | ||
7062 | { | ||
7063 | find interpretation(problem,interpretation); | ||
7064 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7065 | // e is exported | ||
7066 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
7067 | } | ||
7068 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
7069 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
7070 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7071 | var_e, var_t1, var_t2) | ||
7072 | { | ||
7073 | find interpretation(problem,interpretation); | ||
7074 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7075 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7076 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7077 | // e is exported | ||
7078 | // t1 is exported | ||
7079 | // t2 is exported | ||
7080 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7081 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7082 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7083 | var_virtual0 == var_t1; | ||
7084 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7085 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
7086 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
7087 | var_virtual1 == var_t2; | ||
7088 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7089 | } | ||
7090 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
7091 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7092 | var_e, var_t1, var_t2) | ||
7093 | { | ||
7094 | find interpretation(problem,interpretation); | ||
7095 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7096 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7097 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7098 | // e is exported | ||
7099 | // t1 is exported | ||
7100 | // t2 is exported | ||
7101 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7102 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7103 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7104 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
7105 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7106 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
7107 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
7108 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
7109 | var_t1 != var_t2; | ||
7110 | } | ||
7111 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
7112 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7113 | var_e, var_t1, var_t2) | ||
7114 | { | ||
7115 | find interpretation(problem,interpretation); | ||
7116 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7117 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7118 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7119 | // e is exported | ||
7120 | // t1 is exported | ||
7121 | // t2 is exported | ||
7122 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7123 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7124 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7125 | var_virtual0 == var_t1; | ||
7126 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7127 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
7128 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
7129 | var_virtual1 == var_t2; | ||
7130 | var_t1 != var_t2; | ||
7131 | } | ||
7132 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
7133 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
7134 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7135 | var_t, var_e) | ||
7136 | { | ||
7137 | find interpretation(problem,interpretation); | ||
7138 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7139 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7140 | // t is exported | ||
7141 | // e is exported | ||
7142 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7143 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7144 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7145 | var_virtual0 == var_t; | ||
7146 | } | ||
7147 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
7148 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7149 | var_t, var_e) | ||
7150 | { | ||
7151 | find interpretation(problem,interpretation); | ||
7152 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7153 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
7154 | // t is exported | ||
7155 | // e is exported | ||
7156 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
7157 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7158 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7159 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
7160 | } | ||
7161 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
7162 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7163 | var_t, var_e) | ||
7164 | { | ||
7165 | find interpretation(problem,interpretation); | ||
7166 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7167 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7168 | // t is exported | ||
7169 | // e is exported | ||
7170 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7171 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7172 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7173 | var_virtual0 == var_t; | ||
7174 | } | ||
7175 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
7176 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
7177 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7178 | var_t, var_f) | ||
7179 | { | ||
7180 | find interpretation(problem,interpretation); | ||
7181 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7182 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7183 | // t is exported | ||
7184 | // f is exported | ||
7185 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7186 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
7187 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7188 | var_virtual0 == var_t; | ||
7189 | } | ||
7190 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
7191 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7192 | var_t, var_f) | ||
7193 | { | ||
7194 | find interpretation(problem,interpretation); | ||
7195 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7196 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7197 | // t is exported | ||
7198 | // f is exported | ||
7199 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7200 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
7201 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7202 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
7203 | } | ||
7204 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
7205 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7206 | var_t, var_f) | ||
7207 | { | ||
7208 | find interpretation(problem,interpretation); | ||
7209 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7210 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7211 | // t is exported | ||
7212 | // f is exported | ||
7213 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7214 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
7215 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7216 | var_virtual0 == var_t; | ||
7217 | } | ||
7218 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
7219 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
7220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7221 | var_region) | ||
7222 | { | ||
7223 | find interpretation(problem,interpretation); | ||
7224 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7225 | // region is exported | ||
7226 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
7227 | } | ||
7228 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
7229 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7230 | var_region) | ||
7231 | { | ||
7232 | find interpretation(problem,interpretation); | ||
7233 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
7234 | // region is exported | ||
7235 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
7236 | } | ||
7237 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
7238 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7239 | var_region) | ||
7240 | { | ||
7241 | find interpretation(problem,interpretation); | ||
7242 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7243 | // region is exported | ||
7244 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
7245 | } | ||
7246 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
7247 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
7248 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7249 | var_region, var_state) | ||
7250 | { | ||
7251 | find interpretation(problem,interpretation); | ||
7252 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7253 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
7254 | // region is exported | ||
7255 | // state is exported | ||
7256 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7257 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
7258 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7259 | var_virtual0 == var_state; | ||
7260 | } | ||
7261 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
7262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7263 | var_region, var_state) | ||
7264 | { | ||
7265 | find interpretation(problem,interpretation); | ||
7266 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
7267 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
7268 | // region is exported | ||
7269 | // state is exported | ||
7270 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
7271 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
7272 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7273 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
7274 | } | ||
7275 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
7276 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7277 | var_region, var_state) | ||
7278 | { | ||
7279 | find interpretation(problem,interpretation); | ||
7280 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7281 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
7282 | // region is exported | ||
7283 | // state is exported | ||
7284 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7285 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
7286 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7287 | var_virtual0 == var_state; | ||
7288 | } | ||
7289 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
7290 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
7291 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7292 | var_c) | ||
7293 | { | ||
7294 | find interpretation(problem,interpretation); | ||
7295 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7296 | // c is exported | ||
7297 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
7298 | } | ||
7299 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
7300 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7301 | var_c) | ||
7302 | { | ||
7303 | find interpretation(problem,interpretation); | ||
7304 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
7305 | // c is exported | ||
7306 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
7307 | } | ||
7308 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
7309 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7310 | var_c) | ||
7311 | { | ||
7312 | find interpretation(problem,interpretation); | ||
7313 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7314 | // c is exported | ||
7315 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
7316 | } | ||
7317 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
7318 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
7319 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7320 | var_c) | ||
7321 | { | ||
7322 | find interpretation(problem,interpretation); | ||
7323 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7324 | // c is exported | ||
7325 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
7326 | } | ||
7327 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
7328 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7329 | var_c) | ||
7330 | { | ||
7331 | find interpretation(problem,interpretation); | ||
7332 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
7333 | // c is exported | ||
7334 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
7335 | } | ||
7336 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
7337 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7338 | var_c) | ||
7339 | { | ||
7340 | find interpretation(problem,interpretation); | ||
7341 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7342 | // c is exported | ||
7343 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
7344 | } | ||
7345 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
7346 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
7347 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7348 | var_s) | ||
7349 | { | ||
7350 | find interpretation(problem,interpretation); | ||
7351 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7352 | // s is exported | ||
7353 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
7354 | } | ||
7355 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
7356 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7357 | var_s) | ||
7358 | { | ||
7359 | find interpretation(problem,interpretation); | ||
7360 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7361 | // s is exported | ||
7362 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
7363 | } | ||
7364 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
7365 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7366 | var_s) | ||
7367 | { | ||
7368 | find interpretation(problem,interpretation); | ||
7369 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7370 | // s is exported | ||
7371 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
7372 | } | ||
7373 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
7374 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
7375 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7376 | var_s) | ||
7377 | { | ||
7378 | find interpretation(problem,interpretation); | ||
7379 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7380 | // s is exported | ||
7381 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
7382 | } | ||
7383 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
7384 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7385 | var_s) | ||
7386 | { | ||
7387 | find interpretation(problem,interpretation); | ||
7388 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7389 | // s is exported | ||
7390 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
7391 | } | ||
7392 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
7393 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7394 | var_s) | ||
7395 | { | ||
7396 | find interpretation(problem,interpretation); | ||
7397 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7398 | // s is exported | ||
7399 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
7400 | } | ||
7401 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
7402 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
7403 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7404 | var_s, var_v1, var_v2) | ||
7405 | { | ||
7406 | find interpretation(problem,interpretation); | ||
7407 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7408 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7409 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7410 | // s is exported | ||
7411 | // v1 is exported | ||
7412 | // v2 is exported | ||
7413 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
7414 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
7415 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7416 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7417 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7418 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7419 | var_virtual0 == var_v1; | ||
7420 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7421 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7422 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7423 | var_virtual1 == var_v2; | ||
7424 | }or{ | ||
7425 | find interpretation(problem,interpretation); | ||
7426 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7427 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7428 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7429 | // s is exported | ||
7430 | // v1 is exported | ||
7431 | // v2 is exported | ||
7432 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
7433 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
7434 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7435 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7436 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7437 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7438 | var_virtual0 == var_v1; | ||
7439 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7440 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7441 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7442 | var_virtual1 == var_v2; | ||
7443 | } | ||
7444 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
7445 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7446 | var_s, var_v1, var_v2) | ||
7447 | { | ||
7448 | find interpretation(problem,interpretation); | ||
7449 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7450 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7451 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7452 | // s is exported | ||
7453 | // v1 is exported | ||
7454 | // v2 is exported | ||
7455 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
7456 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
7457 | var_t1 != var_t2; | ||
7458 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7459 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7460 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7461 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
7462 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7463 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7464 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7465 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
7466 | }or{ | ||
7467 | find interpretation(problem,interpretation); | ||
7468 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7469 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7470 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7471 | // s is exported | ||
7472 | // v1 is exported | ||
7473 | // v2 is exported | ||
7474 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
7475 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
7476 | var_t1 != var_t2; | ||
7477 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7478 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7479 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7480 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
7481 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7482 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7483 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7484 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
7485 | } | ||
7486 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
7487 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7488 | var_s, var_v1, var_v2) | ||
7489 | { | ||
7490 | find interpretation(problem,interpretation); | ||
7491 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7492 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7493 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7494 | // s is exported | ||
7495 | // v1 is exported | ||
7496 | // v2 is exported | ||
7497 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
7498 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
7499 | var_t1 != var_t2; | ||
7500 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7501 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7502 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7503 | var_virtual0 == var_v1; | ||
7504 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7505 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7506 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7507 | var_virtual1 == var_v2; | ||
7508 | }or{ | ||
7509 | find interpretation(problem,interpretation); | ||
7510 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7511 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7512 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7513 | // s is exported | ||
7514 | // v1 is exported | ||
7515 | // v2 is exported | ||
7516 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
7517 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
7518 | var_t1 != var_t2; | ||
7519 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7520 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7521 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7522 | var_virtual0 == var_v1; | ||
7523 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7524 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7525 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7526 | var_virtual1 == var_v2; | ||
7527 | } | ||
7528 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
7529 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
7530 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7531 | var_s) | ||
7532 | { | ||
7533 | find interpretation(problem,interpretation); | ||
7534 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7535 | // s is exported | ||
7536 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
7537 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
7538 | } | ||
7539 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
7540 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7541 | var_s) | ||
7542 | { | ||
7543 | find interpretation(problem,interpretation); | ||
7544 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7545 | // s is exported | ||
7546 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
7547 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
7548 | } | ||
7549 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
7550 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7551 | var_s) | ||
7552 | { | ||
7553 | find interpretation(problem,interpretation); | ||
7554 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7555 | // s is exported | ||
7556 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
7557 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
7558 | } | ||
7559 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
7560 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
7561 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7562 | var_v) | ||
7563 | { | ||
7564 | find interpretation(problem,interpretation); | ||
7565 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7566 | // v is exported | ||
7567 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
7568 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
7569 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
7570 | } | ||
7571 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
7572 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7573 | var_v) | ||
7574 | { | ||
7575 | find interpretation(problem,interpretation); | ||
7576 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7577 | // v is exported | ||
7578 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
7579 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
7580 | var_trg1 != var_trg2; | ||
7581 | } | ||
7582 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
7583 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7584 | var_v) | ||
7585 | { | ||
7586 | find interpretation(problem,interpretation); | ||
7587 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7588 | // v is exported | ||
7589 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
7590 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
7591 | var_trg1 != var_trg2; | ||
7592 | } | ||
7593 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
7594 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
7595 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7596 | var_v) | ||
7597 | { | ||
7598 | find interpretation(problem,interpretation); | ||
7599 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7600 | // v is exported | ||
7601 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
7602 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
7603 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
7604 | } | ||
7605 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
7606 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7607 | var_v) | ||
7608 | { | ||
7609 | find interpretation(problem,interpretation); | ||
7610 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7611 | // v is exported | ||
7612 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
7613 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
7614 | var_src1 != var_src2; | ||
7615 | } | ||
7616 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
7617 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7618 | var_v) | ||
7619 | { | ||
7620 | find interpretation(problem,interpretation); | ||
7621 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7622 | // v is exported | ||
7623 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
7624 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
7625 | var_src1 != var_src2; | ||
7626 | } | ||
7627 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
7628 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
7629 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7630 | var_s, var_v1, var_v2) | ||
7631 | { | ||
7632 | find interpretation(problem,interpretation); | ||
7633 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7634 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7635 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7636 | // s is exported | ||
7637 | // v1 is exported | ||
7638 | // v2 is exported | ||
7639 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
7640 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
7641 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7642 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7643 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7644 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7645 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7646 | var_virtual1 == var_v1; | ||
7647 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7648 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7649 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7650 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7651 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7652 | var_virtual3 == var_v2; | ||
7653 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
7654 | }or{ | ||
7655 | find interpretation(problem,interpretation); | ||
7656 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7657 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7658 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7659 | // s is exported | ||
7660 | // v1 is exported | ||
7661 | // v2 is exported | ||
7662 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
7663 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
7664 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7665 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7666 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7667 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7668 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7669 | var_virtual1 == var_v1; | ||
7670 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7671 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7672 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7673 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7674 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7675 | var_virtual3 == var_v2; | ||
7676 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
7677 | } | ||
7678 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
7679 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7680 | var_s, var_v1, var_v2) | ||
7681 | { | ||
7682 | find interpretation(problem,interpretation); | ||
7683 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7684 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7685 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7686 | // s is exported | ||
7687 | // v1 is exported | ||
7688 | // v2 is exported | ||
7689 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
7690 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
7691 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7692 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7693 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7694 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7695 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7696 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
7697 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7698 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7699 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7700 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7701 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7702 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
7703 | var_r1 != var_r2; | ||
7704 | }or{ | ||
7705 | find interpretation(problem,interpretation); | ||
7706 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7707 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7708 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7709 | // s is exported | ||
7710 | // v1 is exported | ||
7711 | // v2 is exported | ||
7712 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
7713 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
7714 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7715 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7716 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7717 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7718 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7719 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
7720 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7721 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7722 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7723 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7724 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7725 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
7726 | var_r1 != var_r2; | ||
7727 | } | ||
7728 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
7729 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7730 | var_s, var_v1, var_v2) | ||
7731 | { | ||
7732 | find interpretation(problem,interpretation); | ||
7733 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7734 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7735 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7736 | // s is exported | ||
7737 | // v1 is exported | ||
7738 | // v2 is exported | ||
7739 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
7740 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
7741 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7742 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7743 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7744 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7745 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7746 | var_virtual1 == var_v1; | ||
7747 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7748 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7749 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7750 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7751 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7752 | var_virtual3 == var_v2; | ||
7753 | var_r1 != var_r2; | ||
7754 | }or{ | ||
7755 | find interpretation(problem,interpretation); | ||
7756 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7757 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7758 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7759 | // s is exported | ||
7760 | // v1 is exported | ||
7761 | // v2 is exported | ||
7762 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
7763 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
7764 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7765 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7766 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7767 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7768 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7769 | var_virtual1 == var_v1; | ||
7770 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7771 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7772 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7773 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7774 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7775 | var_virtual3 == var_v2; | ||
7776 | var_r1 != var_r2; | ||
7777 | } | ||
7778 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
7779 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
7780 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7781 | var_parent, var_child) | ||
7782 | { | ||
7783 | find interpretation(problem,interpretation); | ||
7784 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
7785 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
7786 | // parent is exported | ||
7787 | // child is exported | ||
7788 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
7789 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
7790 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7791 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7792 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7793 | var_virtual1 == var_child; | ||
7794 | } | ||
7795 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
7796 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7797 | var_parent, var_child) | ||
7798 | { | ||
7799 | find interpretation(problem,interpretation); | ||
7800 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
7801 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
7802 | // parent is exported | ||
7803 | // child is exported | ||
7804 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
7805 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
7806 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7807 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7808 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7809 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
7810 | } | ||
7811 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
7812 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7813 | var_parent, var_child) | ||
7814 | { | ||
7815 | find interpretation(problem,interpretation); | ||
7816 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
7817 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
7818 | // parent is exported | ||
7819 | // child is exported | ||
7820 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
7821 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
7822 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7823 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7824 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7825 | var_virtual1 == var_child; | ||
7826 | } | ||
7827 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
7828 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
7829 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7830 | var_s, var_v) | ||
7831 | { | ||
7832 | find interpretation(problem,interpretation); | ||
7833 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7834 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
7835 | // s is exported | ||
7836 | // v is exported | ||
7837 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
7838 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
7839 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
7840 | }or{ | ||
7841 | find interpretation(problem,interpretation); | ||
7842 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7843 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
7844 | // s is exported | ||
7845 | // v is exported | ||
7846 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
7847 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
7848 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
7849 | } | ||
7850 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
7851 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7852 | var_s, var_v) | ||
7853 | { | ||
7854 | find interpretation(problem,interpretation); | ||
7855 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7856 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
7857 | // s is exported | ||
7858 | // v is exported | ||
7859 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
7860 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
7861 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
7862 | }or{ | ||
7863 | find interpretation(problem,interpretation); | ||
7864 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7865 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
7866 | // s is exported | ||
7867 | // v is exported | ||
7868 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
7869 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
7870 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
7871 | } | ||
7872 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
7873 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7874 | var_s, var_v) | ||
7875 | { | ||
7876 | find interpretation(problem,interpretation); | ||
7877 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7878 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
7879 | // s is exported | ||
7880 | // v is exported | ||
7881 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
7882 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
7883 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
7884 | }or{ | ||
7885 | find interpretation(problem,interpretation); | ||
7886 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7887 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
7888 | // s is exported | ||
7889 | // v is exported | ||
7890 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
7891 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
7892 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
7893 | } | ||
7894 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
7895 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
7896 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7897 | var_composite) | ||
7898 | { | ||
7899 | find interpretation(problem,interpretation); | ||
7900 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7901 | // composite is exported | ||
7902 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7903 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
7904 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7905 | var_virtual0 == var_region1; | ||
7906 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7907 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
7908 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
7909 | var_virtual1 == var_region2; | ||
7910 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
7911 | } | ||
7912 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
7913 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7914 | var_composite) | ||
7915 | { | ||
7916 | find interpretation(problem,interpretation); | ||
7917 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7918 | // composite is exported | ||
7919 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7920 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
7921 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7922 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
7923 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7924 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
7925 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
7926 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
7927 | var_region1 != var_region2; | ||
7928 | } | ||
7929 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
7930 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7931 | var_composite) | ||
7932 | { | ||
7933 | find interpretation(problem,interpretation); | ||
7934 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7935 | // composite is exported | ||
7936 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7937 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
7938 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7939 | var_virtual0 == var_region1; | ||
7940 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
7941 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
7942 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
7943 | var_virtual1 == var_region2; | ||
7944 | var_region1 != var_region2; | ||
7945 | } | ||
7946 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
7947 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
7948 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7949 | var_s) | ||
7950 | { | ||
7951 | find interpretation(problem,interpretation); | ||
7952 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7953 | // s is exported | ||
7954 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7955 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
7956 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7957 | var_virtual0 == var_s; | ||
7958 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7959 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
7960 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7961 | var_virtual1 == var_s; | ||
7962 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
7963 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
7964 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
7965 | var_virtual2 == var_s; | ||
7966 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7967 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
7968 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
7969 | }or{ | ||
7970 | find interpretation(problem,interpretation); | ||
7971 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7972 | // s is exported | ||
7973 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7974 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
7975 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7976 | var_virtual0 == var_s; | ||
7977 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7978 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
7979 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7980 | var_virtual1 == var_s; | ||
7981 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
7982 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
7983 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
7984 | var_virtual2 == var_s; | ||
7985 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7986 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
7987 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
7988 | } | ||
7989 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
7990 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7991 | var_s) | ||
7992 | { | ||
7993 | find interpretation(problem,interpretation); | ||
7994 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7995 | // s is exported | ||
7996 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7997 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
7998 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7999 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
8000 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8001 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8002 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8003 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
8004 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8005 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8006 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8007 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
8008 | var_t1 != var_t2; | ||
8009 | var_t2 != var_t3; | ||
8010 | var_t1 != var_t3; | ||
8011 | }or{ | ||
8012 | find interpretation(problem,interpretation); | ||
8013 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8014 | // s is exported | ||
8015 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8016 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8017 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8018 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
8019 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8020 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8021 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8022 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
8023 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8024 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8025 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8026 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
8027 | var_t1 != var_t2; | ||
8028 | var_t2 != var_t3; | ||
8029 | var_t1 != var_t3; | ||
8030 | } | ||
8031 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
8032 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8033 | var_s) | ||
8034 | { | ||
8035 | find interpretation(problem,interpretation); | ||
8036 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8037 | // s is exported | ||
8038 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8039 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8040 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8041 | var_virtual0 == var_s; | ||
8042 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8043 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8044 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8045 | var_virtual1 == var_s; | ||
8046 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8047 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8048 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8049 | var_virtual2 == var_s; | ||
8050 | var_t1 != var_t2; | ||
8051 | var_t2 != var_t3; | ||
8052 | var_t1 != var_t3; | ||
8053 | }or{ | ||
8054 | find interpretation(problem,interpretation); | ||
8055 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8056 | // s is exported | ||
8057 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8058 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8059 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8060 | var_virtual0 == var_s; | ||
8061 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8062 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8063 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8064 | var_virtual1 == var_s; | ||
8065 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8066 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8067 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8068 | var_virtual2 == var_s; | ||
8069 | var_t1 != var_t2; | ||
8070 | var_t2 != var_t3; | ||
8071 | var_t1 != var_t3; | ||
8072 | } | ||
8073 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
8074 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
8075 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8076 | var_s1, var_s2) | ||
8077 | { | ||
8078 | find interpretation(problem,interpretation); | ||
8079 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8080 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8081 | // s1 is exported | ||
8082 | // s2 is exported | ||
8083 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8084 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8085 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
8086 | } | ||
8087 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
8088 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8089 | var_s1, var_s2) | ||
8090 | { | ||
8091 | find interpretation(problem,interpretation); | ||
8092 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8093 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8094 | // s1 is exported | ||
8095 | // s2 is exported | ||
8096 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8097 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8098 | var_s1 != var_s2; | ||
8099 | } | ||
8100 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
8101 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8102 | var_s1, var_s2) | ||
8103 | { | ||
8104 | find interpretation(problem,interpretation); | ||
8105 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8106 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8107 | // s1 is exported | ||
8108 | // s2 is exported | ||
8109 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8110 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8111 | var_s1 != var_s2; | ||
8112 | } | ||
8113 | |||
8114 | ////////// | ||
8115 | // 1.4 Containment Indexer | ||
8116 | ////////// | ||
8117 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
8118 | find mustContains4(_,_,source,target); | ||
8119 | } | ||
8120 | |||
8121 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8122 | source: DefinedElement, target: DefinedElement) | ||
8123 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
8124 | |||
8125 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
8126 | |||
8127 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
8128 | |||
8129 | private pattern mustTransitiveContains(source,target) { | ||
8130 | find mustContains2+(source,target); | ||
8131 | } | ||
8132 | |||
8133 | ////////// | ||
8134 | // 2. Invalidation Indexers | ||
8135 | ////////// | ||
8136 | // 2.1 Invalidated by WF Queries | ||
8137 | ////////// | ||
8138 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8139 | var_r1) | ||
8140 | { | ||
8141 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
8142 | } | ||
8143 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8144 | var_r) | ||
8145 | { | ||
8146 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
8147 | } | ||
8148 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8149 | var_t, var_e) | ||
8150 | { | ||
8151 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
8152 | } | ||
8153 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8154 | var_e) | ||
8155 | { | ||
8156 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
8157 | } | ||
8158 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8159 | var_e, var_t1, var_t2) | ||
8160 | { | ||
8161 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
8162 | } | ||
8163 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8164 | var_t, var_e) | ||
8165 | { | ||
8166 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
8167 | } | ||
8168 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8169 | var_t, var_f) | ||
8170 | { | ||
8171 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
8172 | } | ||
8173 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8174 | var_region) | ||
8175 | { | ||
8176 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
8177 | } | ||
8178 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8179 | var_c) | ||
8180 | { | ||
8181 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
8182 | } | ||
8183 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8184 | var_c) | ||
8185 | { | ||
8186 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
8187 | } | ||
8188 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8189 | var_s) | ||
8190 | { | ||
8191 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
8192 | } | ||
8193 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8194 | var_s) | ||
8195 | { | ||
8196 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
8197 | } | ||
8198 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8199 | var_s, var_v1, var_v2) | ||
8200 | { | ||
8201 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
8202 | } | ||
8203 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8204 | var_s) | ||
8205 | { | ||
8206 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
8207 | } | ||
8208 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8209 | var_s, var_v1, var_v2) | ||
8210 | { | ||
8211 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
8212 | } | ||
8213 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8214 | var_s, var_v) | ||
8215 | { | ||
8216 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
8217 | } | ||
8218 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8219 | var_s) | ||
8220 | { | ||
8221 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
8222 | } | ||
8223 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8224 | var_s1, var_s2) | ||
8225 | { | ||
8226 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
8227 | } | ||
8228 | |||
8229 | ////////// | ||
8230 | // 3. Unfinishedness Indexers | ||
8231 | ////////// | ||
8232 | // 3.1 Unfinishedness Measured by Multiplicity | ||
8233 | ////////// | ||
8234 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
8235 | find interpretation(problem,interpretation); | ||
8236 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8237 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
8238 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
8239 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
8240 | check(numberOfExistingReferences < 1); | ||
8241 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
8242 | } | ||
8243 | |||
8244 | ////////// | ||
8245 | // 3.2 Unfinishedness Measured by WF Queries | ||
8246 | ////////// | ||
8247 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8248 | var_r1) | ||
8249 | { | ||
8250 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
8251 | } | ||
8252 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8253 | var_r) | ||
8254 | { | ||
8255 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
8256 | } | ||
8257 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8258 | var_t, var_e) | ||
8259 | { | ||
8260 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
8261 | } | ||
8262 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8263 | var_e) | ||
8264 | { | ||
8265 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
8266 | } | ||
8267 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8268 | var_e, var_t1, var_t2) | ||
8269 | { | ||
8270 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
8271 | } | ||
8272 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8273 | var_t, var_e) | ||
8274 | { | ||
8275 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
8276 | } | ||
8277 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8278 | var_t, var_f) | ||
8279 | { | ||
8280 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
8281 | } | ||
8282 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8283 | var_region) | ||
8284 | { | ||
8285 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
8286 | } | ||
8287 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8288 | var_c) | ||
8289 | { | ||
8290 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
8291 | } | ||
8292 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8293 | var_c) | ||
8294 | { | ||
8295 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
8296 | } | ||
8297 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8298 | var_s) | ||
8299 | { | ||
8300 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
8301 | } | ||
8302 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8303 | var_s) | ||
8304 | { | ||
8305 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
8306 | } | ||
8307 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8308 | var_s, var_v1, var_v2) | ||
8309 | { | ||
8310 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
8311 | } | ||
8312 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8313 | var_s) | ||
8314 | { | ||
8315 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
8316 | } | ||
8317 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8318 | var_s, var_v1, var_v2) | ||
8319 | { | ||
8320 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
8321 | } | ||
8322 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8323 | var_s, var_v) | ||
8324 | { | ||
8325 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
8326 | } | ||
8327 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8328 | var_s) | ||
8329 | { | ||
8330 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
8331 | } | ||
8332 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8333 | var_s1, var_s2) | ||
8334 | { | ||
8335 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
8336 | } | ||
8337 | |||
8338 | ////////// | ||
8339 | // 4. Refinement Indexers | ||
8340 | ////////// | ||
8341 | // 4.1 Object constructors | ||
8342 | ////////// | ||
8343 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
8344 | { | ||
8345 | find interpretation(problem,interpretation); | ||
8346 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
8347 | find mustExist(problem, interpretation, root); | ||
8348 | }or{ | ||
8349 | find interpretation(problem,interpretation); | ||
8350 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
8351 | find mustExist(problem, interpretation, root); | ||
8352 | }or{ | ||
8353 | find interpretation(problem,interpretation); | ||
8354 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
8355 | find mustExist(problem, interpretation, root); | ||
8356 | }or{ | ||
8357 | find interpretation(problem,interpretation); | ||
8358 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
8359 | find mustExist(problem, interpretation, root); | ||
8360 | }or{ | ||
8361 | find interpretation(problem,interpretation); | ||
8362 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
8363 | find mustExist(problem, interpretation, root); | ||
8364 | }or{ | ||
8365 | find interpretation(problem,interpretation); | ||
8366 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
8367 | find mustExist(problem, interpretation, root); | ||
8368 | }or{ | ||
8369 | find interpretation(problem,interpretation); | ||
8370 | find mustInstanceOfState_class(problem,interpretation,root); | ||
8371 | find mustExist(problem, interpretation, root); | ||
8372 | }or{ | ||
8373 | find interpretation(problem,interpretation); | ||
8374 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
8375 | find mustExist(problem, interpretation, root); | ||
8376 | }or{ | ||
8377 | find interpretation(problem,interpretation); | ||
8378 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
8379 | find mustExist(problem, interpretation, root); | ||
8380 | }or{ | ||
8381 | find interpretation(problem,interpretation); | ||
8382 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
8383 | find mustExist(problem, interpretation, root); | ||
8384 | }or{ | ||
8385 | find interpretation(problem,interpretation); | ||
8386 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
8387 | find mustExist(problem, interpretation, root); | ||
8388 | }or{ | ||
8389 | find interpretation(problem,interpretation); | ||
8390 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
8391 | find mustExist(problem, interpretation, root); | ||
8392 | }or{ | ||
8393 | find interpretation(problem,interpretation); | ||
8394 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
8395 | find mustExist(problem, interpretation, root); | ||
8396 | }or{ | ||
8397 | find interpretation(problem,interpretation); | ||
8398 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
8399 | find mustExist(problem, interpretation, root); | ||
8400 | }or{ | ||
8401 | find interpretation(problem,interpretation); | ||
8402 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
8403 | find mustExist(problem, interpretation, root); | ||
8404 | }or{ | ||
8405 | find interpretation(problem,interpretation); | ||
8406 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
8407 | find mustExist(problem, interpretation, root); | ||
8408 | }or{ | ||
8409 | find interpretation(problem,interpretation); | ||
8410 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
8411 | find mustExist(problem, interpretation, root); | ||
8412 | } | ||
8413 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
8414 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8415 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8416 | container:DefinedElement) | ||
8417 | { | ||
8418 | find interpretation(problem,interpretation); | ||
8419 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8420 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
8421 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8422 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8423 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8424 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
8425 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8426 | find mustExist(problem, interpretation, container); | ||
8427 | neg find mustExist(problem, interpretation, newObject); | ||
8428 | } | ||
8429 | pattern createObject_Exit_class( | ||
8430 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8431 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8432 | { | ||
8433 | find interpretation(problem,interpretation); | ||
8434 | neg find hasElementInContainment(problem,interpretation); | ||
8435 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8436 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
8437 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
8438 | find mayExist(problem, interpretation, newObject); | ||
8439 | neg find mustExist(problem, interpretation, newObject); | ||
8440 | } | ||
8441 | pattern createObject_State_class_by_vertices_reference_Region( | ||
8442 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8443 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8444 | container:DefinedElement) | ||
8445 | { | ||
8446 | find interpretation(problem,interpretation); | ||
8447 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8448 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
8449 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8450 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8451 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8452 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
8453 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8454 | find mustExist(problem, interpretation, container); | ||
8455 | neg find mustExist(problem, interpretation, newObject); | ||
8456 | } | ||
8457 | pattern createObject_State_class( | ||
8458 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8459 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8460 | { | ||
8461 | find interpretation(problem,interpretation); | ||
8462 | neg find hasElementInContainment(problem,interpretation); | ||
8463 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8464 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
8465 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
8466 | find mayExist(problem, interpretation, newObject); | ||
8467 | neg find mustExist(problem, interpretation, newObject); | ||
8468 | } | ||
8469 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
8470 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8471 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8472 | container:DefinedElement) | ||
8473 | { | ||
8474 | find interpretation(problem,interpretation); | ||
8475 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8476 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
8477 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8478 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8479 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8480 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
8481 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8482 | find mustExist(problem, interpretation, container); | ||
8483 | neg find mustExist(problem, interpretation, newObject); | ||
8484 | } | ||
8485 | pattern createObject_Synchronization_class( | ||
8486 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8487 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8488 | { | ||
8489 | find interpretation(problem,interpretation); | ||
8490 | neg find hasElementInContainment(problem,interpretation); | ||
8491 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8492 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
8493 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
8494 | find mayExist(problem, interpretation, newObject); | ||
8495 | neg find mustExist(problem, interpretation, newObject); | ||
8496 | } | ||
8497 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
8498 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8499 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8500 | container:DefinedElement) | ||
8501 | { | ||
8502 | find interpretation(problem,interpretation); | ||
8503 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8504 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
8505 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8506 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8507 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8508 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
8509 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8510 | find mustExist(problem, interpretation, container); | ||
8511 | neg find mustExist(problem, interpretation, newObject); | ||
8512 | } | ||
8513 | pattern createObject_Choice_class( | ||
8514 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8515 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8516 | { | ||
8517 | find interpretation(problem,interpretation); | ||
8518 | neg find hasElementInContainment(problem,interpretation); | ||
8519 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8520 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
8521 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
8522 | find mayExist(problem, interpretation, newObject); | ||
8523 | neg find mustExist(problem, interpretation, newObject); | ||
8524 | } | ||
8525 | pattern createObject_Statechart_class_UndefinedPart( | ||
8526 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8527 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8528 | { | ||
8529 | find interpretation(problem,interpretation); | ||
8530 | neg find hasElementInContainment(problem,interpretation); | ||
8531 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8532 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
8533 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
8534 | find mayExist(problem, interpretation, newObject); | ||
8535 | neg find mustExist(problem, interpretation, newObject); | ||
8536 | } | ||
8537 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
8538 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8539 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8540 | container:DefinedElement) | ||
8541 | { | ||
8542 | find interpretation(problem,interpretation); | ||
8543 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8544 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
8545 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8546 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8547 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8548 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
8549 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8550 | find mustExist(problem, interpretation, container); | ||
8551 | neg find mustExist(problem, interpretation, newObject); | ||
8552 | } | ||
8553 | pattern createObject_FinalState_class( | ||
8554 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8555 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8556 | { | ||
8557 | find interpretation(problem,interpretation); | ||
8558 | neg find hasElementInContainment(problem,interpretation); | ||
8559 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8560 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
8561 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
8562 | find mayExist(problem, interpretation, newObject); | ||
8563 | neg find mustExist(problem, interpretation, newObject); | ||
8564 | } | ||
8565 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
8566 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8567 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8568 | container:DefinedElement) | ||
8569 | { | ||
8570 | find interpretation(problem,interpretation); | ||
8571 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8572 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
8573 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8574 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8575 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8576 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
8577 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8578 | find mustExist(problem, interpretation, container); | ||
8579 | neg find mustExist(problem, interpretation, newObject); | ||
8580 | } | ||
8581 | pattern createObject_Entry_class( | ||
8582 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8583 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8584 | { | ||
8585 | find interpretation(problem,interpretation); | ||
8586 | neg find hasElementInContainment(problem,interpretation); | ||
8587 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8588 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
8589 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
8590 | find mayExist(problem, interpretation, newObject); | ||
8591 | neg find mustExist(problem, interpretation, newObject); | ||
8592 | } | ||
8593 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
8594 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8595 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8596 | container:DefinedElement) | ||
8597 | { | ||
8598 | find interpretation(problem,interpretation); | ||
8599 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8600 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
8601 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8602 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
8603 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
8604 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
8605 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
8606 | find mustExist(problem, interpretation, container); | ||
8607 | neg find mustExist(problem, interpretation, newObject); | ||
8608 | } | ||
8609 | pattern createObject_Region_class( | ||
8610 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8611 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8612 | { | ||
8613 | find interpretation(problem,interpretation); | ||
8614 | neg find hasElementInContainment(problem,interpretation); | ||
8615 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8616 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
8617 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
8618 | find mayExist(problem, interpretation, newObject); | ||
8619 | neg find mustExist(problem, interpretation, newObject); | ||
8620 | } | ||
8621 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
8622 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8623 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8624 | container:DefinedElement) | ||
8625 | { | ||
8626 | find interpretation(problem,interpretation); | ||
8627 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8628 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
8629 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8630 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
8631 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
8632 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
8633 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
8634 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
8635 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
8636 | find mustExist(problem, interpretation, container); | ||
8637 | neg find mustExist(problem, interpretation, newObject); | ||
8638 | } | ||
8639 | pattern createObject_Transition_class( | ||
8640 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8641 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8642 | { | ||
8643 | find interpretation(problem,interpretation); | ||
8644 | neg find hasElementInContainment(problem,interpretation); | ||
8645 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8646 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
8647 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
8648 | find mayExist(problem, interpretation, newObject); | ||
8649 | neg find mustExist(problem, interpretation, newObject); | ||
8650 | } | ||
8651 | |||
8652 | ////////// | ||
8653 | // 4.2 Type refinement | ||
8654 | ////////// | ||
8655 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8656 | find interpretation(problem,interpretation); | ||
8657 | PartialInterpretation.newElements(interpretation,element); | ||
8658 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
8659 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8660 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8661 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8662 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8663 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8664 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8665 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8666 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8667 | } | ||
8668 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8669 | find interpretation(problem,interpretation); | ||
8670 | PartialInterpretation.newElements(interpretation,element); | ||
8671 | find mayInstanceOfState_class(problem,interpretation,element); | ||
8672 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
8673 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
8674 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
8675 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8676 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8677 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
8678 | } | ||
8679 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8680 | find interpretation(problem,interpretation); | ||
8681 | PartialInterpretation.newElements(interpretation,element); | ||
8682 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
8683 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8684 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8685 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8686 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8687 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8688 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8689 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8690 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8691 | } | ||
8692 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8693 | find interpretation(problem,interpretation); | ||
8694 | PartialInterpretation.newElements(interpretation,element); | ||
8695 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
8696 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8697 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8698 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8699 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8700 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8701 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8702 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8703 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8704 | } | ||
8705 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8706 | find interpretation(problem,interpretation); | ||
8707 | PartialInterpretation.newElements(interpretation,element); | ||
8708 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
8709 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
8710 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
8711 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8712 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8713 | } | ||
8714 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8715 | find interpretation(problem,interpretation); | ||
8716 | PartialInterpretation.newElements(interpretation,element); | ||
8717 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
8718 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8719 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
8720 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
8721 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8722 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8723 | } | ||
8724 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8725 | find interpretation(problem,interpretation); | ||
8726 | PartialInterpretation.newElements(interpretation,element); | ||
8727 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
8728 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8729 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8730 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8731 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8732 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8733 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8734 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8735 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8736 | } | ||
8737 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8738 | find interpretation(problem,interpretation); | ||
8739 | PartialInterpretation.newElements(interpretation,element); | ||
8740 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
8741 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8742 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
8743 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8744 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8745 | } | ||
8746 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8747 | find interpretation(problem,interpretation); | ||
8748 | PartialInterpretation.newElements(interpretation,element); | ||
8749 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
8750 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8751 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
8752 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8753 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8754 | } | ||
8755 | |||
8756 | ////////// | ||
8757 | // 4.3 Relation refinement | ||
8758 | ////////// | ||
8759 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
8760 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8761 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
8762 | from: DefinedElement, to: DefinedElement) | ||
8763 | { | ||
8764 | find interpretation(problem,interpretation); | ||
8765 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8766 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
8767 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
8768 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
8769 | find mustExist(problem, interpretation, from); | ||
8770 | find mustExist(problem, interpretation, to); | ||
8771 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
8772 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
8773 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
8774 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
8775 | } | ||
8776 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
8777 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
8778 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
8779 | |||
8780 | ////////// | ||
8781 | // 0. Util | ||
8782 | ////////// | ||
8783 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8784 | PartialInterpretation.problem(interpretation,problem); | ||
8785 | } | ||
8786 | |||
8787 | ///////////////////////// | ||
8788 | // 0.1 Existence | ||
8789 | ///////////////////////// | ||
8790 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8791 | find interpretation(problem,interpretation); | ||
8792 | LogicProblem.elements(problem,element); | ||
8793 | } or { | ||
8794 | find interpretation(problem,interpretation); | ||
8795 | PartialInterpretation.newElements(interpretation,element); | ||
8796 | } | ||
8797 | |||
8798 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8799 | find mustExist(problem,interpretation,element); | ||
8800 | } or { | ||
8801 | find interpretation(problem,interpretation); | ||
8802 | neg find elementCloseWorld(element); | ||
8803 | PartialInterpretation.openWorldElements(interpretation,element); | ||
8804 | } | ||
8805 | |||
8806 | private pattern elementCloseWorld(element:DefinedElement) { | ||
8807 | PartialInterpretation.openWorldElements(i,element); | ||
8808 | PartialInterpretation.maxNewElements(i,0); | ||
8809 | } or { | ||
8810 | Scope.targetTypeInterpretation(scope,interpretation); | ||
8811 | PartialTypeInterpratation.elements(interpretation,element); | ||
8812 | Scope.maxNewElements(scope,0); | ||
8813 | } | ||
8814 | |||
8815 | //////////////////////// | ||
8816 | // 0.2 Equivalence | ||
8817 | //////////////////////// | ||
8818 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
8819 | find mayExist(problem,interpretation,a); | ||
8820 | find mayExist(problem,interpretation,b); | ||
8821 | a == b; | ||
8822 | } | ||
8823 | |||
8824 | //////////////////////// | ||
8825 | // 0.3 Required Patterns by TypeIndexer | ||
8826 | //////////////////////// | ||
8827 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
8828 | find interpretation(problem,interpretation); | ||
8829 | LogicProblem.types(problem,type); | ||
8830 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8831 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8832 | } | ||
8833 | |||
8834 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
8835 | find interpretation(problem,interpretation); | ||
8836 | LogicProblem.types(problem,type); | ||
8837 | TypeDefinition.elements(type,element); | ||
8838 | } or { | ||
8839 | find interpretation(problem,interpretation); | ||
8840 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
8841 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
8842 | } | ||
8843 | |||
8844 | private pattern isPrimitive(element: PrimitiveElement) { | ||
8845 | PrimitiveElement(element); | ||
8846 | } | ||
8847 | |||
8848 | ////////// | ||
8849 | // 1. Problem-Specific Base Indexers | ||
8850 | ////////// | ||
8851 | // 1.1 Type Indexers | ||
8852 | ////////// | ||
8853 | // 1.1.1 primitive Type Indexers | ||
8854 | ////////// | ||
8855 | |||
8856 | ////////// | ||
8857 | // 1.1.2 domain-specific Type Indexers | ||
8858 | ////////// | ||
8859 | /** | ||
8860 | * An element must be an instance of type "Pseudostate class". | ||
8861 | */ | ||
8862 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8863 | Type.name(type,"Pseudostate class"); | ||
8864 | find directInstanceOf(problem,interpretation,element,type); | ||
8865 | } | ||
8866 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8867 | find interpretation(problem,interpretation); | ||
8868 | PartialInterpretation.scopes(interpretation,scope); | ||
8869 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8870 | Scope.maxNewElements(scope,0); | ||
8871 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8872 | Type.name(type,"Pseudostate class"); | ||
8873 | } | ||
8874 | |||
8875 | /** | ||
8876 | * An element may be an instance of type "Pseudostate class". | ||
8877 | */ | ||
8878 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
8879 | { | ||
8880 | find interpretation(problem,interpretation); | ||
8881 | PartialInterpretation.newElements(interpretation,element); | ||
8882 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8883 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8884 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8885 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8886 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8887 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8888 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8889 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8890 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
8891 | neg find isPrimitive(element); | ||
8892 | } or { | ||
8893 | find interpretation(problem,interpretation); | ||
8894 | PartialInterpretation.openWorldElements(interpretation,element); | ||
8895 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8896 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8897 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8898 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8899 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8900 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8901 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8902 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8903 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
8904 | neg find isPrimitive(element); | ||
8905 | } or | ||
8906 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
8907 | /** | ||
8908 | * An element must be an instance of type "Vertex class". | ||
8909 | */ | ||
8910 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8911 | Type.name(type,"Vertex class"); | ||
8912 | find directInstanceOf(problem,interpretation,element,type); | ||
8913 | } | ||
8914 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8915 | find interpretation(problem,interpretation); | ||
8916 | PartialInterpretation.scopes(interpretation,scope); | ||
8917 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8918 | Scope.maxNewElements(scope,0); | ||
8919 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8920 | Type.name(type,"Vertex class"); | ||
8921 | } | ||
8922 | |||
8923 | /** | ||
8924 | * An element may be an instance of type "Vertex class". | ||
8925 | */ | ||
8926 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
8927 | { | ||
8928 | find interpretation(problem,interpretation); | ||
8929 | PartialInterpretation.newElements(interpretation,element); | ||
8930 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8931 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8932 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
8933 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8934 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8935 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
8936 | neg find isPrimitive(element); | ||
8937 | } or { | ||
8938 | find interpretation(problem,interpretation); | ||
8939 | PartialInterpretation.openWorldElements(interpretation,element); | ||
8940 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8941 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8942 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
8943 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8944 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8945 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
8946 | neg find isPrimitive(element); | ||
8947 | } or | ||
8948 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
8949 | /** | ||
8950 | * An element must be an instance of type "Region class". | ||
8951 | */ | ||
8952 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8953 | Type.name(type,"Region class"); | ||
8954 | find directInstanceOf(problem,interpretation,element,type); | ||
8955 | } | ||
8956 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8957 | find interpretation(problem,interpretation); | ||
8958 | PartialInterpretation.scopes(interpretation,scope); | ||
8959 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8960 | Scope.maxNewElements(scope,0); | ||
8961 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8962 | Type.name(type,"Region class"); | ||
8963 | } | ||
8964 | |||
8965 | /** | ||
8966 | * An element may be an instance of type "Region class". | ||
8967 | */ | ||
8968 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
8969 | { | ||
8970 | find interpretation(problem,interpretation); | ||
8971 | PartialInterpretation.newElements(interpretation,element); | ||
8972 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8973 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8974 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
8975 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
8976 | neg find isPrimitive(element); | ||
8977 | } or { | ||
8978 | find interpretation(problem,interpretation); | ||
8979 | PartialInterpretation.openWorldElements(interpretation,element); | ||
8980 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8981 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8982 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
8983 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
8984 | neg find isPrimitive(element); | ||
8985 | } or | ||
8986 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
8987 | /** | ||
8988 | * An element must be an instance of type "Transition class". | ||
8989 | */ | ||
8990 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8991 | Type.name(type,"Transition class"); | ||
8992 | find directInstanceOf(problem,interpretation,element,type); | ||
8993 | } | ||
8994 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8995 | find interpretation(problem,interpretation); | ||
8996 | PartialInterpretation.scopes(interpretation,scope); | ||
8997 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8998 | Scope.maxNewElements(scope,0); | ||
8999 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9000 | Type.name(type,"Transition class"); | ||
9001 | } | ||
9002 | |||
9003 | /** | ||
9004 | * An element may be an instance of type "Transition class". | ||
9005 | */ | ||
9006 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9007 | { | ||
9008 | find interpretation(problem,interpretation); | ||
9009 | PartialInterpretation.newElements(interpretation,element); | ||
9010 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9011 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9012 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9013 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
9014 | neg find isPrimitive(element); | ||
9015 | } or { | ||
9016 | find interpretation(problem,interpretation); | ||
9017 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9018 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9019 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9020 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9021 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
9022 | neg find isPrimitive(element); | ||
9023 | } or | ||
9024 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
9025 | /** | ||
9026 | * An element must be an instance of type "Statechart class". | ||
9027 | */ | ||
9028 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9029 | Type.name(type,"Statechart class"); | ||
9030 | find directInstanceOf(problem,interpretation,element,type); | ||
9031 | } | ||
9032 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9033 | find interpretation(problem,interpretation); | ||
9034 | PartialInterpretation.scopes(interpretation,scope); | ||
9035 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9036 | Scope.maxNewElements(scope,0); | ||
9037 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9038 | Type.name(type,"Statechart class"); | ||
9039 | } | ||
9040 | |||
9041 | /** | ||
9042 | * An element may be an instance of type "Statechart class". | ||
9043 | */ | ||
9044 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9045 | { | ||
9046 | find interpretation(problem,interpretation); | ||
9047 | PartialInterpretation.newElements(interpretation,element); | ||
9048 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9049 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9050 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9051 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9052 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
9053 | neg find isPrimitive(element); | ||
9054 | } or { | ||
9055 | find interpretation(problem,interpretation); | ||
9056 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9057 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9058 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9059 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9060 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9061 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
9062 | neg find isPrimitive(element); | ||
9063 | } or | ||
9064 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
9065 | /** | ||
9066 | * An element must be an instance of type "Entry class". | ||
9067 | */ | ||
9068 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9069 | Type.name(type,"Entry class"); | ||
9070 | find directInstanceOf(problem,interpretation,element,type); | ||
9071 | } | ||
9072 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9073 | find interpretation(problem,interpretation); | ||
9074 | PartialInterpretation.scopes(interpretation,scope); | ||
9075 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9076 | Scope.maxNewElements(scope,0); | ||
9077 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9078 | Type.name(type,"Entry class"); | ||
9079 | } | ||
9080 | |||
9081 | /** | ||
9082 | * An element may be an instance of type "Entry class". | ||
9083 | */ | ||
9084 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9085 | { | ||
9086 | find interpretation(problem,interpretation); | ||
9087 | PartialInterpretation.newElements(interpretation,element); | ||
9088 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9089 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9090 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9091 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9092 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9093 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9094 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9095 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
9096 | neg find isPrimitive(element); | ||
9097 | } or { | ||
9098 | find interpretation(problem,interpretation); | ||
9099 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9100 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9101 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9102 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9103 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9104 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9105 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9106 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9107 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
9108 | neg find isPrimitive(element); | ||
9109 | } or | ||
9110 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
9111 | /** | ||
9112 | * An element must be an instance of type "Synchronization class". | ||
9113 | */ | ||
9114 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9115 | Type.name(type,"Synchronization class"); | ||
9116 | find directInstanceOf(problem,interpretation,element,type); | ||
9117 | } | ||
9118 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9119 | find interpretation(problem,interpretation); | ||
9120 | PartialInterpretation.scopes(interpretation,scope); | ||
9121 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9122 | Scope.maxNewElements(scope,0); | ||
9123 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9124 | Type.name(type,"Synchronization class"); | ||
9125 | } | ||
9126 | |||
9127 | /** | ||
9128 | * An element may be an instance of type "Synchronization class". | ||
9129 | */ | ||
9130 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9131 | { | ||
9132 | find interpretation(problem,interpretation); | ||
9133 | PartialInterpretation.newElements(interpretation,element); | ||
9134 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9135 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9136 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9137 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9138 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9139 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9140 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9141 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
9142 | neg find isPrimitive(element); | ||
9143 | } or { | ||
9144 | find interpretation(problem,interpretation); | ||
9145 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9146 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9147 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9148 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9149 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9150 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9151 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9152 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9153 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
9154 | neg find isPrimitive(element); | ||
9155 | } or | ||
9156 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
9157 | /** | ||
9158 | * An element must be an instance of type "State class". | ||
9159 | */ | ||
9160 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9161 | Type.name(type,"State class"); | ||
9162 | find directInstanceOf(problem,interpretation,element,type); | ||
9163 | } | ||
9164 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9165 | find interpretation(problem,interpretation); | ||
9166 | PartialInterpretation.scopes(interpretation,scope); | ||
9167 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9168 | Scope.maxNewElements(scope,0); | ||
9169 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9170 | Type.name(type,"State class"); | ||
9171 | } | ||
9172 | |||
9173 | /** | ||
9174 | * An element may be an instance of type "State class". | ||
9175 | */ | ||
9176 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9177 | { | ||
9178 | find interpretation(problem,interpretation); | ||
9179 | PartialInterpretation.newElements(interpretation,element); | ||
9180 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9181 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9182 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9183 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9184 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9185 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
9186 | neg find isPrimitive(element); | ||
9187 | } or { | ||
9188 | find interpretation(problem,interpretation); | ||
9189 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9190 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9191 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9192 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9193 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9194 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9195 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
9196 | neg find isPrimitive(element); | ||
9197 | } or | ||
9198 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
9199 | /** | ||
9200 | * An element must be an instance of type "RegularState class". | ||
9201 | */ | ||
9202 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9203 | Type.name(type,"RegularState class"); | ||
9204 | find directInstanceOf(problem,interpretation,element,type); | ||
9205 | } | ||
9206 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9207 | find interpretation(problem,interpretation); | ||
9208 | PartialInterpretation.scopes(interpretation,scope); | ||
9209 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9210 | Scope.maxNewElements(scope,0); | ||
9211 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9212 | Type.name(type,"RegularState class"); | ||
9213 | } | ||
9214 | |||
9215 | /** | ||
9216 | * An element may be an instance of type "RegularState class". | ||
9217 | */ | ||
9218 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9219 | { | ||
9220 | find interpretation(problem,interpretation); | ||
9221 | PartialInterpretation.newElements(interpretation,element); | ||
9222 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9223 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9224 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9225 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9226 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9227 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
9228 | neg find isPrimitive(element); | ||
9229 | } or { | ||
9230 | find interpretation(problem,interpretation); | ||
9231 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9232 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9233 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9234 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9235 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9236 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9237 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
9238 | neg find isPrimitive(element); | ||
9239 | } or | ||
9240 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
9241 | /** | ||
9242 | * An element must be an instance of type "CompositeElement class". | ||
9243 | */ | ||
9244 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9245 | Type.name(type,"CompositeElement class"); | ||
9246 | find directInstanceOf(problem,interpretation,element,type); | ||
9247 | } | ||
9248 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9249 | find interpretation(problem,interpretation); | ||
9250 | PartialInterpretation.scopes(interpretation,scope); | ||
9251 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9252 | Scope.maxNewElements(scope,0); | ||
9253 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9254 | Type.name(type,"CompositeElement class"); | ||
9255 | } | ||
9256 | |||
9257 | /** | ||
9258 | * An element may be an instance of type "CompositeElement class". | ||
9259 | */ | ||
9260 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9261 | { | ||
9262 | find interpretation(problem,interpretation); | ||
9263 | PartialInterpretation.newElements(interpretation,element); | ||
9264 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9265 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9266 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9267 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9268 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9269 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
9270 | neg find isPrimitive(element); | ||
9271 | } or { | ||
9272 | find interpretation(problem,interpretation); | ||
9273 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9274 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9275 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9276 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9277 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9278 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9279 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
9280 | neg find isPrimitive(element); | ||
9281 | } or | ||
9282 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
9283 | /** | ||
9284 | * An element must be an instance of type "Choice class". | ||
9285 | */ | ||
9286 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9287 | Type.name(type,"Choice class"); | ||
9288 | find directInstanceOf(problem,interpretation,element,type); | ||
9289 | } | ||
9290 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9291 | find interpretation(problem,interpretation); | ||
9292 | PartialInterpretation.scopes(interpretation,scope); | ||
9293 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9294 | Scope.maxNewElements(scope,0); | ||
9295 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9296 | Type.name(type,"Choice class"); | ||
9297 | } | ||
9298 | |||
9299 | /** | ||
9300 | * An element may be an instance of type "Choice class". | ||
9301 | */ | ||
9302 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9303 | { | ||
9304 | find interpretation(problem,interpretation); | ||
9305 | PartialInterpretation.newElements(interpretation,element); | ||
9306 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9307 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9308 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9309 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9310 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9311 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9312 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9313 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
9314 | neg find isPrimitive(element); | ||
9315 | } or { | ||
9316 | find interpretation(problem,interpretation); | ||
9317 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9318 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9319 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9320 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9321 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9322 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9323 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9324 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9325 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
9326 | neg find isPrimitive(element); | ||
9327 | } or | ||
9328 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
9329 | /** | ||
9330 | * An element must be an instance of type "Exit class". | ||
9331 | */ | ||
9332 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9333 | Type.name(type,"Exit class"); | ||
9334 | find directInstanceOf(problem,interpretation,element,type); | ||
9335 | } | ||
9336 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9337 | find interpretation(problem,interpretation); | ||
9338 | PartialInterpretation.scopes(interpretation,scope); | ||
9339 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9340 | Scope.maxNewElements(scope,0); | ||
9341 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9342 | Type.name(type,"Exit class"); | ||
9343 | } | ||
9344 | |||
9345 | /** | ||
9346 | * An element may be an instance of type "Exit class". | ||
9347 | */ | ||
9348 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9349 | { | ||
9350 | find interpretation(problem,interpretation); | ||
9351 | PartialInterpretation.newElements(interpretation,element); | ||
9352 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9353 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9354 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9355 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9356 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9357 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9358 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9359 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
9360 | neg find isPrimitive(element); | ||
9361 | } or { | ||
9362 | find interpretation(problem,interpretation); | ||
9363 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9364 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9365 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9366 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9367 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9368 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9369 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9370 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9371 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
9372 | neg find isPrimitive(element); | ||
9373 | } or | ||
9374 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
9375 | /** | ||
9376 | * An element must be an instance of type "FinalState class". | ||
9377 | */ | ||
9378 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9379 | Type.name(type,"FinalState class"); | ||
9380 | find directInstanceOf(problem,interpretation,element,type); | ||
9381 | } | ||
9382 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9383 | find interpretation(problem,interpretation); | ||
9384 | PartialInterpretation.scopes(interpretation,scope); | ||
9385 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9386 | Scope.maxNewElements(scope,0); | ||
9387 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9388 | Type.name(type,"FinalState class"); | ||
9389 | } | ||
9390 | |||
9391 | /** | ||
9392 | * An element may be an instance of type "FinalState class". | ||
9393 | */ | ||
9394 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9395 | { | ||
9396 | find interpretation(problem,interpretation); | ||
9397 | PartialInterpretation.newElements(interpretation,element); | ||
9398 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9399 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9400 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9401 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9402 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
9403 | neg find isPrimitive(element); | ||
9404 | } or { | ||
9405 | find interpretation(problem,interpretation); | ||
9406 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9407 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9408 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9409 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9410 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9411 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
9412 | neg find isPrimitive(element); | ||
9413 | } or | ||
9414 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
9415 | /** | ||
9416 | * An element must be an instance of type "Statechart class DefinedPart". | ||
9417 | */ | ||
9418 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9419 | Type.name(type,"Statechart class DefinedPart"); | ||
9420 | find directInstanceOf(problem,interpretation,element,type); | ||
9421 | } | ||
9422 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9423 | find interpretation(problem,interpretation); | ||
9424 | PartialInterpretation.scopes(interpretation,scope); | ||
9425 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9426 | Scope.maxNewElements(scope,0); | ||
9427 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9428 | Type.name(type,"Statechart class DefinedPart"); | ||
9429 | } | ||
9430 | |||
9431 | /** | ||
9432 | * An element may be an instance of type "Statechart class DefinedPart". | ||
9433 | */ | ||
9434 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9435 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
9436 | /** | ||
9437 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
9438 | */ | ||
9439 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9440 | Type.name(type,"Statechart class UndefinedPart"); | ||
9441 | find directInstanceOf(problem,interpretation,element,type); | ||
9442 | } | ||
9443 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9444 | find interpretation(problem,interpretation); | ||
9445 | PartialInterpretation.scopes(interpretation,scope); | ||
9446 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9447 | Scope.maxNewElements(scope,0); | ||
9448 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9449 | Type.name(type,"Statechart class UndefinedPart"); | ||
9450 | } | ||
9451 | |||
9452 | /** | ||
9453 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
9454 | */ | ||
9455 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9456 | { | ||
9457 | find interpretation(problem,interpretation); | ||
9458 | PartialInterpretation.newElements(interpretation,element); | ||
9459 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9460 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9461 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9462 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
9463 | neg find isPrimitive(element); | ||
9464 | } or { | ||
9465 | find interpretation(problem,interpretation); | ||
9466 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9467 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9468 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9469 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9470 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
9471 | neg find isPrimitive(element); | ||
9472 | } or | ||
9473 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
9474 | /** | ||
9475 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
9476 | */ | ||
9477 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9478 | Type.name(type,"CompositeElement class DefinedPart"); | ||
9479 | find directInstanceOf(problem,interpretation,element,type); | ||
9480 | } | ||
9481 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9482 | find interpretation(problem,interpretation); | ||
9483 | PartialInterpretation.scopes(interpretation,scope); | ||
9484 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9485 | Scope.maxNewElements(scope,0); | ||
9486 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9487 | Type.name(type,"CompositeElement class DefinedPart"); | ||
9488 | } | ||
9489 | |||
9490 | /** | ||
9491 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
9492 | */ | ||
9493 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9494 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
9495 | /** | ||
9496 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
9497 | */ | ||
9498 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9499 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
9500 | find directInstanceOf(problem,interpretation,element,type); | ||
9501 | } | ||
9502 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9503 | find interpretation(problem,interpretation); | ||
9504 | PartialInterpretation.scopes(interpretation,scope); | ||
9505 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9506 | Scope.maxNewElements(scope,0); | ||
9507 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9508 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
9509 | } | ||
9510 | |||
9511 | /** | ||
9512 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
9513 | */ | ||
9514 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9515 | { | ||
9516 | find interpretation(problem,interpretation); | ||
9517 | PartialInterpretation.newElements(interpretation,element); | ||
9518 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9519 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9520 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9521 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9522 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
9523 | neg find isPrimitive(element); | ||
9524 | } or { | ||
9525 | find interpretation(problem,interpretation); | ||
9526 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9527 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9528 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9529 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9530 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9531 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
9532 | neg find isPrimitive(element); | ||
9533 | } or | ||
9534 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
9535 | |||
9536 | ////////// | ||
9537 | // 1.2 Relation Declaration Indexers | ||
9538 | ////////// | ||
9539 | /** | ||
9540 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
9541 | */ | ||
9542 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
9543 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9544 | source: DefinedElement, target:DefinedElement) | ||
9545 | { | ||
9546 | find interpretation(problem,interpretation); | ||
9547 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9548 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
9549 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9550 | BinaryElementRelationLink.param1(link,source); | ||
9551 | BinaryElementRelationLink.param2(link,target); | ||
9552 | } | ||
9553 | /** | ||
9554 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
9555 | */ | ||
9556 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
9557 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9558 | source: DefinedElement, target:DefinedElement) | ||
9559 | { | ||
9560 | find interpretation(problem,interpretation); | ||
9561 | // The two endpoint of the link have to exist | ||
9562 | find mayExist(problem, interpretation, source); | ||
9563 | find mayExist(problem, interpretation, target); | ||
9564 | // Type consistency | ||
9565 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
9566 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
9567 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
9568 | // the upper bound of the opposite reference multiplicity should be considered. | ||
9569 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
9570 | check(numberOfExistingOppositeReferences < 1); | ||
9571 | } or { | ||
9572 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
9573 | } | ||
9574 | /** | ||
9575 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
9576 | */ | ||
9577 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
9578 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9579 | source: DefinedElement, target:DefinedElement) | ||
9580 | { | ||
9581 | find interpretation(problem,interpretation); | ||
9582 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9583 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
9584 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9585 | BinaryElementRelationLink.param1(link,source); | ||
9586 | BinaryElementRelationLink.param2(link,target); | ||
9587 | } | ||
9588 | /** | ||
9589 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
9590 | */ | ||
9591 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
9592 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9593 | source: DefinedElement, target:DefinedElement) | ||
9594 | { | ||
9595 | find interpretation(problem,interpretation); | ||
9596 | // The two endpoint of the link have to exist | ||
9597 | find mayExist(problem, interpretation, source); | ||
9598 | find mayExist(problem, interpretation, target); | ||
9599 | // Type consistency | ||
9600 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
9601 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
9602 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
9603 | // the upper bound of the opposite reference multiplicity should be considered. | ||
9604 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
9605 | check(numberOfExistingOppositeReferences < 1); | ||
9606 | // The reference is containment, then a new reference cannot be create if: | ||
9607 | // 1. Multiple parents | ||
9608 | neg find mustContains4(problem,interpretation,_,target); | ||
9609 | // 2. Circle in the containment hierarchy | ||
9610 | neg find mustTransitiveContains(source,target); | ||
9611 | } or { | ||
9612 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
9613 | } | ||
9614 | /** | ||
9615 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
9616 | */ | ||
9617 | private pattern mustInRelationvertices_reference_Region( | ||
9618 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9619 | source: DefinedElement, target:DefinedElement) | ||
9620 | { | ||
9621 | find interpretation(problem,interpretation); | ||
9622 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9623 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
9624 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9625 | BinaryElementRelationLink.param1(link,source); | ||
9626 | BinaryElementRelationLink.param2(link,target); | ||
9627 | } | ||
9628 | /** | ||
9629 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
9630 | */ | ||
9631 | private pattern mayInRelationvertices_reference_Region( | ||
9632 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9633 | source: DefinedElement, target:DefinedElement) | ||
9634 | { | ||
9635 | find interpretation(problem,interpretation); | ||
9636 | // The two endpoint of the link have to exist | ||
9637 | find mayExist(problem, interpretation, source); | ||
9638 | find mayExist(problem, interpretation, target); | ||
9639 | // Type consistency | ||
9640 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
9641 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
9642 | // The reference is containment, then a new reference cannot be create if: | ||
9643 | // 1. Multiple parents | ||
9644 | neg find mustContains4(problem,interpretation,_,target); | ||
9645 | // 2. Circle in the containment hierarchy | ||
9646 | neg find mustTransitiveContains(source,target); | ||
9647 | } or { | ||
9648 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
9649 | } | ||
9650 | /** | ||
9651 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
9652 | */ | ||
9653 | private pattern mustInRelationtarget_reference_Transition( | ||
9654 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9655 | source: DefinedElement, target:DefinedElement) | ||
9656 | { | ||
9657 | find interpretation(problem,interpretation); | ||
9658 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9659 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
9660 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9661 | BinaryElementRelationLink.param1(link,source); | ||
9662 | BinaryElementRelationLink.param2(link,target); | ||
9663 | } | ||
9664 | /** | ||
9665 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
9666 | */ | ||
9667 | private pattern mayInRelationtarget_reference_Transition( | ||
9668 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9669 | source: DefinedElement, target:DefinedElement) | ||
9670 | { | ||
9671 | find interpretation(problem,interpretation); | ||
9672 | // The two endpoint of the link have to exist | ||
9673 | find mayExist(problem, interpretation, source); | ||
9674 | find mayExist(problem, interpretation, target); | ||
9675 | // Type consistency | ||
9676 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
9677 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
9678 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9679 | // the upper bound of the multiplicity should be considered. | ||
9680 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
9681 | check(numberOfExistingReferences < 1); | ||
9682 | } or { | ||
9683 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
9684 | } | ||
9685 | /** | ||
9686 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
9687 | */ | ||
9688 | private pattern mustInRelationsource_reference_Transition( | ||
9689 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9690 | source: DefinedElement, target:DefinedElement) | ||
9691 | { | ||
9692 | find interpretation(problem,interpretation); | ||
9693 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9694 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
9695 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9696 | BinaryElementRelationLink.param1(link,source); | ||
9697 | BinaryElementRelationLink.param2(link,target); | ||
9698 | } | ||
9699 | /** | ||
9700 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
9701 | */ | ||
9702 | private pattern mayInRelationsource_reference_Transition( | ||
9703 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9704 | source: DefinedElement, target:DefinedElement) | ||
9705 | { | ||
9706 | find interpretation(problem,interpretation); | ||
9707 | // The two endpoint of the link have to exist | ||
9708 | find mayExist(problem, interpretation, source); | ||
9709 | find mayExist(problem, interpretation, target); | ||
9710 | // Type consistency | ||
9711 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
9712 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
9713 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9714 | // the upper bound of the multiplicity should be considered. | ||
9715 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
9716 | check(numberOfExistingReferences < 1); | ||
9717 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
9718 | // 1. Multiple parents | ||
9719 | neg find mustContains4(problem,interpretation,source,_); | ||
9720 | // 2. Circle in the containment hierarchy | ||
9721 | neg find mustTransitiveContains(source,target); | ||
9722 | } or { | ||
9723 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
9724 | } | ||
9725 | /** | ||
9726 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
9727 | */ | ||
9728 | private pattern mustInRelationregions_reference_CompositeElement( | ||
9729 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9730 | source: DefinedElement, target:DefinedElement) | ||
9731 | { | ||
9732 | find interpretation(problem,interpretation); | ||
9733 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9734 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
9735 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9736 | BinaryElementRelationLink.param1(link,source); | ||
9737 | BinaryElementRelationLink.param2(link,target); | ||
9738 | } | ||
9739 | /** | ||
9740 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
9741 | */ | ||
9742 | private pattern mayInRelationregions_reference_CompositeElement( | ||
9743 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9744 | source: DefinedElement, target:DefinedElement) | ||
9745 | { | ||
9746 | find interpretation(problem,interpretation); | ||
9747 | // The two endpoint of the link have to exist | ||
9748 | find mayExist(problem, interpretation, source); | ||
9749 | find mayExist(problem, interpretation, target); | ||
9750 | // Type consistency | ||
9751 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
9752 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
9753 | // The reference is containment, then a new reference cannot be create if: | ||
9754 | // 1. Multiple parents | ||
9755 | neg find mustContains4(problem,interpretation,_,target); | ||
9756 | // 2. Circle in the containment hierarchy | ||
9757 | neg find mustTransitiveContains(source,target); | ||
9758 | } or { | ||
9759 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
9760 | } | ||
9761 | |||
9762 | ////////// | ||
9763 | // 1.3 Relation Definition Indexers | ||
9764 | ////////// | ||
9765 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
9766 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
9767 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9768 | var_r1, var_e1) | ||
9769 | { | ||
9770 | find interpretation(problem,interpretation); | ||
9771 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9772 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
9773 | // r1 is exported | ||
9774 | // e1 is exported | ||
9775 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9776 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
9777 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
9778 | var_virtual0 == var_e1; | ||
9779 | } | ||
9780 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
9781 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9782 | var_r1, var_e1) | ||
9783 | { | ||
9784 | find interpretation(problem,interpretation); | ||
9785 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9786 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
9787 | // r1 is exported | ||
9788 | // e1 is exported | ||
9789 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9790 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
9791 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
9792 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
9793 | } | ||
9794 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
9795 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9796 | var_r1, var_e1) | ||
9797 | { | ||
9798 | find interpretation(problem,interpretation); | ||
9799 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9800 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
9801 | // r1 is exported | ||
9802 | // e1 is exported | ||
9803 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9804 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
9805 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
9806 | var_virtual0 == var_e1; | ||
9807 | } | ||
9808 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
9809 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
9810 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9811 | var_r1) | ||
9812 | { | ||
9813 | find interpretation(problem,interpretation); | ||
9814 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9815 | // r1 is exported | ||
9816 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
9817 | } | ||
9818 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
9819 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9820 | var_r1) | ||
9821 | { | ||
9822 | find interpretation(problem,interpretation); | ||
9823 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9824 | // r1 is exported | ||
9825 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
9826 | } | ||
9827 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
9828 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9829 | var_r1) | ||
9830 | { | ||
9831 | find interpretation(problem,interpretation); | ||
9832 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
9833 | // r1 is exported | ||
9834 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
9835 | } | ||
9836 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
9837 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
9838 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9839 | var_r) | ||
9840 | { | ||
9841 | find interpretation(problem,interpretation); | ||
9842 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
9843 | // r is exported | ||
9844 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
9845 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
9846 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
9847 | } | ||
9848 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
9849 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9850 | var_r) | ||
9851 | { | ||
9852 | find interpretation(problem,interpretation); | ||
9853 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
9854 | // r is exported | ||
9855 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
9856 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
9857 | var_e1 != var_e2; | ||
9858 | } | ||
9859 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
9860 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9861 | var_r) | ||
9862 | { | ||
9863 | find interpretation(problem,interpretation); | ||
9864 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
9865 | // r is exported | ||
9866 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
9867 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
9868 | var_e1 != var_e2; | ||
9869 | } | ||
9870 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
9871 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
9872 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9873 | var_t, var_src, var_trg) | ||
9874 | { | ||
9875 | find interpretation(problem,interpretation); | ||
9876 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9877 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
9878 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
9879 | // t is exported | ||
9880 | // src is exported | ||
9881 | // trg is exported | ||
9882 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9883 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
9884 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
9885 | var_virtual0 == var_src; | ||
9886 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9887 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
9888 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
9889 | var_virtual1 == var_trg; | ||
9890 | } | ||
9891 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
9892 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9893 | var_t, var_src, var_trg) | ||
9894 | { | ||
9895 | find interpretation(problem,interpretation); | ||
9896 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
9897 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
9898 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
9899 | // t is exported | ||
9900 | // src is exported | ||
9901 | // trg is exported | ||
9902 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
9903 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
9904 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
9905 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
9906 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
9907 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
9908 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
9909 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
9910 | } | ||
9911 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
9912 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9913 | var_t, var_src, var_trg) | ||
9914 | { | ||
9915 | find interpretation(problem,interpretation); | ||
9916 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9917 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
9918 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
9919 | // t is exported | ||
9920 | // src is exported | ||
9921 | // trg is exported | ||
9922 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9923 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
9924 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
9925 | var_virtual0 == var_src; | ||
9926 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9927 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
9928 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
9929 | var_virtual1 == var_trg; | ||
9930 | } | ||
9931 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
9932 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
9933 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9934 | var_t, var_e) | ||
9935 | { | ||
9936 | find interpretation(problem,interpretation); | ||
9937 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9938 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
9939 | // t is exported | ||
9940 | // e is exported | ||
9941 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
9942 | } | ||
9943 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
9944 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9945 | var_t, var_e) | ||
9946 | { | ||
9947 | find interpretation(problem,interpretation); | ||
9948 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
9949 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
9950 | // t is exported | ||
9951 | // e is exported | ||
9952 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
9953 | } | ||
9954 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
9955 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9956 | var_t, var_e) | ||
9957 | { | ||
9958 | find interpretation(problem,interpretation); | ||
9959 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
9960 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
9961 | // t is exported | ||
9962 | // e is exported | ||
9963 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
9964 | } | ||
9965 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
9966 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
9967 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9968 | var_e) | ||
9969 | { | ||
9970 | find interpretation(problem,interpretation); | ||
9971 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
9972 | // e is exported | ||
9973 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
9974 | } | ||
9975 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
9976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9977 | var_e) | ||
9978 | { | ||
9979 | find interpretation(problem,interpretation); | ||
9980 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
9981 | // e is exported | ||
9982 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
9983 | } | ||
9984 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
9985 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9986 | var_e) | ||
9987 | { | ||
9988 | find interpretation(problem,interpretation); | ||
9989 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
9990 | // e is exported | ||
9991 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
9992 | } | ||
9993 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
9994 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
9995 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9996 | var_e, var_t1, var_t2) | ||
9997 | { | ||
9998 | find interpretation(problem,interpretation); | ||
9999 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10000 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10001 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10002 | // e is exported | ||
10003 | // t1 is exported | ||
10004 | // t2 is exported | ||
10005 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10006 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10007 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10008 | var_virtual0 == var_t1; | ||
10009 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10010 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
10011 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
10012 | var_virtual1 == var_t2; | ||
10013 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10014 | } | ||
10015 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
10016 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10017 | var_e, var_t1, var_t2) | ||
10018 | { | ||
10019 | find interpretation(problem,interpretation); | ||
10020 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10021 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10022 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10023 | // e is exported | ||
10024 | // t1 is exported | ||
10025 | // t2 is exported | ||
10026 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10027 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10028 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10029 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
10030 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10031 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
10032 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
10033 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
10034 | var_t1 != var_t2; | ||
10035 | } | ||
10036 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
10037 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10038 | var_e, var_t1, var_t2) | ||
10039 | { | ||
10040 | find interpretation(problem,interpretation); | ||
10041 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10042 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10043 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10044 | // e is exported | ||
10045 | // t1 is exported | ||
10046 | // t2 is exported | ||
10047 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10048 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10049 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10050 | var_virtual0 == var_t1; | ||
10051 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10052 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
10053 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
10054 | var_virtual1 == var_t2; | ||
10055 | var_t1 != var_t2; | ||
10056 | } | ||
10057 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
10058 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
10059 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10060 | var_t, var_e) | ||
10061 | { | ||
10062 | find interpretation(problem,interpretation); | ||
10063 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10064 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10065 | // t is exported | ||
10066 | // e is exported | ||
10067 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10068 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10069 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10070 | var_virtual0 == var_t; | ||
10071 | } | ||
10072 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
10073 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10074 | var_t, var_e) | ||
10075 | { | ||
10076 | find interpretation(problem,interpretation); | ||
10077 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10078 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
10079 | // t is exported | ||
10080 | // e is exported | ||
10081 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
10082 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10083 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10084 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
10085 | } | ||
10086 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
10087 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10088 | var_t, var_e) | ||
10089 | { | ||
10090 | find interpretation(problem,interpretation); | ||
10091 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10092 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10093 | // t is exported | ||
10094 | // e is exported | ||
10095 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10096 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10097 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10098 | var_virtual0 == var_t; | ||
10099 | } | ||
10100 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
10101 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
10102 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10103 | var_t, var_f) | ||
10104 | { | ||
10105 | find interpretation(problem,interpretation); | ||
10106 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10107 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10108 | // t is exported | ||
10109 | // f is exported | ||
10110 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10111 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
10112 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10113 | var_virtual0 == var_t; | ||
10114 | } | ||
10115 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
10116 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10117 | var_t, var_f) | ||
10118 | { | ||
10119 | find interpretation(problem,interpretation); | ||
10120 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10121 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10122 | // t is exported | ||
10123 | // f is exported | ||
10124 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10125 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
10126 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10127 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
10128 | } | ||
10129 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
10130 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10131 | var_t, var_f) | ||
10132 | { | ||
10133 | find interpretation(problem,interpretation); | ||
10134 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10135 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10136 | // t is exported | ||
10137 | // f is exported | ||
10138 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10139 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
10140 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10141 | var_virtual0 == var_t; | ||
10142 | } | ||
10143 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
10144 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
10145 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10146 | var_region) | ||
10147 | { | ||
10148 | find interpretation(problem,interpretation); | ||
10149 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10150 | // region is exported | ||
10151 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
10152 | } | ||
10153 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
10154 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10155 | var_region) | ||
10156 | { | ||
10157 | find interpretation(problem,interpretation); | ||
10158 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
10159 | // region is exported | ||
10160 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
10161 | } | ||
10162 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
10163 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10164 | var_region) | ||
10165 | { | ||
10166 | find interpretation(problem,interpretation); | ||
10167 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10168 | // region is exported | ||
10169 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
10170 | } | ||
10171 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
10172 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
10173 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10174 | var_region, var_state) | ||
10175 | { | ||
10176 | find interpretation(problem,interpretation); | ||
10177 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10178 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
10179 | // region is exported | ||
10180 | // state is exported | ||
10181 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10182 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
10183 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10184 | var_virtual0 == var_state; | ||
10185 | } | ||
10186 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
10187 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10188 | var_region, var_state) | ||
10189 | { | ||
10190 | find interpretation(problem,interpretation); | ||
10191 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
10192 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
10193 | // region is exported | ||
10194 | // state is exported | ||
10195 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
10196 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
10197 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10198 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
10199 | } | ||
10200 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
10201 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10202 | var_region, var_state) | ||
10203 | { | ||
10204 | find interpretation(problem,interpretation); | ||
10205 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10206 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
10207 | // region is exported | ||
10208 | // state is exported | ||
10209 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10210 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
10211 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10212 | var_virtual0 == var_state; | ||
10213 | } | ||
10214 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
10215 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
10216 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10217 | var_c) | ||
10218 | { | ||
10219 | find interpretation(problem,interpretation); | ||
10220 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10221 | // c is exported | ||
10222 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
10223 | } | ||
10224 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
10225 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10226 | var_c) | ||
10227 | { | ||
10228 | find interpretation(problem,interpretation); | ||
10229 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
10230 | // c is exported | ||
10231 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
10232 | } | ||
10233 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
10234 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10235 | var_c) | ||
10236 | { | ||
10237 | find interpretation(problem,interpretation); | ||
10238 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10239 | // c is exported | ||
10240 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
10241 | } | ||
10242 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
10243 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
10244 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10245 | var_c) | ||
10246 | { | ||
10247 | find interpretation(problem,interpretation); | ||
10248 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10249 | // c is exported | ||
10250 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
10251 | } | ||
10252 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
10253 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10254 | var_c) | ||
10255 | { | ||
10256 | find interpretation(problem,interpretation); | ||
10257 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
10258 | // c is exported | ||
10259 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
10260 | } | ||
10261 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
10262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10263 | var_c) | ||
10264 | { | ||
10265 | find interpretation(problem,interpretation); | ||
10266 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10267 | // c is exported | ||
10268 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
10269 | } | ||
10270 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
10271 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
10272 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10273 | var_s) | ||
10274 | { | ||
10275 | find interpretation(problem,interpretation); | ||
10276 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10277 | // s is exported | ||
10278 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
10279 | } | ||
10280 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
10281 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10282 | var_s) | ||
10283 | { | ||
10284 | find interpretation(problem,interpretation); | ||
10285 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10286 | // s is exported | ||
10287 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
10288 | } | ||
10289 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
10290 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10291 | var_s) | ||
10292 | { | ||
10293 | find interpretation(problem,interpretation); | ||
10294 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10295 | // s is exported | ||
10296 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
10297 | } | ||
10298 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
10299 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
10300 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10301 | var_s) | ||
10302 | { | ||
10303 | find interpretation(problem,interpretation); | ||
10304 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10305 | // s is exported | ||
10306 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
10307 | } | ||
10308 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
10309 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10310 | var_s) | ||
10311 | { | ||
10312 | find interpretation(problem,interpretation); | ||
10313 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10314 | // s is exported | ||
10315 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
10316 | } | ||
10317 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
10318 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10319 | var_s) | ||
10320 | { | ||
10321 | find interpretation(problem,interpretation); | ||
10322 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10323 | // s is exported | ||
10324 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
10325 | } | ||
10326 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
10327 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
10328 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10329 | var_s, var_v1, var_v2) | ||
10330 | { | ||
10331 | find interpretation(problem,interpretation); | ||
10332 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10333 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10334 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10335 | // s is exported | ||
10336 | // v1 is exported | ||
10337 | // v2 is exported | ||
10338 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
10339 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
10340 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10341 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10342 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10343 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10344 | var_virtual0 == var_v1; | ||
10345 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10346 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10347 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10348 | var_virtual1 == var_v2; | ||
10349 | }or{ | ||
10350 | find interpretation(problem,interpretation); | ||
10351 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10352 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10353 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10354 | // s is exported | ||
10355 | // v1 is exported | ||
10356 | // v2 is exported | ||
10357 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
10358 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
10359 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10360 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10361 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10362 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10363 | var_virtual0 == var_v1; | ||
10364 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10365 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10366 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10367 | var_virtual1 == var_v2; | ||
10368 | } | ||
10369 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
10370 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10371 | var_s, var_v1, var_v2) | ||
10372 | { | ||
10373 | find interpretation(problem,interpretation); | ||
10374 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10375 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10376 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10377 | // s is exported | ||
10378 | // v1 is exported | ||
10379 | // v2 is exported | ||
10380 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
10381 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
10382 | var_t1 != var_t2; | ||
10383 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10384 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10385 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10386 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
10387 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10388 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10389 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10390 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
10391 | }or{ | ||
10392 | find interpretation(problem,interpretation); | ||
10393 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10394 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10395 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10396 | // s is exported | ||
10397 | // v1 is exported | ||
10398 | // v2 is exported | ||
10399 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
10400 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
10401 | var_t1 != var_t2; | ||
10402 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10403 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10404 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10405 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
10406 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10407 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10408 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10409 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
10410 | } | ||
10411 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
10412 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10413 | var_s, var_v1, var_v2) | ||
10414 | { | ||
10415 | find interpretation(problem,interpretation); | ||
10416 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10417 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10418 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10419 | // s is exported | ||
10420 | // v1 is exported | ||
10421 | // v2 is exported | ||
10422 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
10423 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
10424 | var_t1 != var_t2; | ||
10425 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10426 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10427 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10428 | var_virtual0 == var_v1; | ||
10429 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10430 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10431 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10432 | var_virtual1 == var_v2; | ||
10433 | }or{ | ||
10434 | find interpretation(problem,interpretation); | ||
10435 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10436 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10437 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10438 | // s is exported | ||
10439 | // v1 is exported | ||
10440 | // v2 is exported | ||
10441 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
10442 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
10443 | var_t1 != var_t2; | ||
10444 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10445 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10446 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10447 | var_virtual0 == var_v1; | ||
10448 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10449 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10450 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10451 | var_virtual1 == var_v2; | ||
10452 | } | ||
10453 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
10454 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
10455 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10456 | var_s) | ||
10457 | { | ||
10458 | find interpretation(problem,interpretation); | ||
10459 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10460 | // s is exported | ||
10461 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
10462 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
10463 | } | ||
10464 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
10465 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10466 | var_s) | ||
10467 | { | ||
10468 | find interpretation(problem,interpretation); | ||
10469 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10470 | // s is exported | ||
10471 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
10472 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
10473 | } | ||
10474 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
10475 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10476 | var_s) | ||
10477 | { | ||
10478 | find interpretation(problem,interpretation); | ||
10479 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10480 | // s is exported | ||
10481 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
10482 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
10483 | } | ||
10484 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
10485 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
10486 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10487 | var_v) | ||
10488 | { | ||
10489 | find interpretation(problem,interpretation); | ||
10490 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10491 | // v is exported | ||
10492 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
10493 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
10494 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
10495 | } | ||
10496 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
10497 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10498 | var_v) | ||
10499 | { | ||
10500 | find interpretation(problem,interpretation); | ||
10501 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10502 | // v is exported | ||
10503 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
10504 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
10505 | var_trg1 != var_trg2; | ||
10506 | } | ||
10507 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
10508 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10509 | var_v) | ||
10510 | { | ||
10511 | find interpretation(problem,interpretation); | ||
10512 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10513 | // v is exported | ||
10514 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
10515 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
10516 | var_trg1 != var_trg2; | ||
10517 | } | ||
10518 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
10519 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
10520 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10521 | var_v) | ||
10522 | { | ||
10523 | find interpretation(problem,interpretation); | ||
10524 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10525 | // v is exported | ||
10526 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
10527 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
10528 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
10529 | } | ||
10530 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
10531 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10532 | var_v) | ||
10533 | { | ||
10534 | find interpretation(problem,interpretation); | ||
10535 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10536 | // v is exported | ||
10537 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
10538 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
10539 | var_src1 != var_src2; | ||
10540 | } | ||
10541 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
10542 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10543 | var_v) | ||
10544 | { | ||
10545 | find interpretation(problem,interpretation); | ||
10546 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10547 | // v is exported | ||
10548 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
10549 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
10550 | var_src1 != var_src2; | ||
10551 | } | ||
10552 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
10553 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
10554 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10555 | var_s, var_v1, var_v2) | ||
10556 | { | ||
10557 | find interpretation(problem,interpretation); | ||
10558 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10559 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10560 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10561 | // s is exported | ||
10562 | // v1 is exported | ||
10563 | // v2 is exported | ||
10564 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
10565 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
10566 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10567 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10568 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10569 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10570 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10571 | var_virtual1 == var_v1; | ||
10572 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10573 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10574 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10575 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10576 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10577 | var_virtual3 == var_v2; | ||
10578 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
10579 | }or{ | ||
10580 | find interpretation(problem,interpretation); | ||
10581 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10582 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10583 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10584 | // s is exported | ||
10585 | // v1 is exported | ||
10586 | // v2 is exported | ||
10587 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
10588 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
10589 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10590 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10591 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10592 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10593 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10594 | var_virtual1 == var_v1; | ||
10595 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10596 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10597 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10598 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10599 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10600 | var_virtual3 == var_v2; | ||
10601 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
10602 | } | ||
10603 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
10604 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10605 | var_s, var_v1, var_v2) | ||
10606 | { | ||
10607 | find interpretation(problem,interpretation); | ||
10608 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10609 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10610 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10611 | // s is exported | ||
10612 | // v1 is exported | ||
10613 | // v2 is exported | ||
10614 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
10615 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
10616 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10617 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10618 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10619 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10620 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10621 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
10622 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10623 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10624 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10625 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10626 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10627 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
10628 | var_r1 != var_r2; | ||
10629 | }or{ | ||
10630 | find interpretation(problem,interpretation); | ||
10631 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10632 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10633 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10634 | // s is exported | ||
10635 | // v1 is exported | ||
10636 | // v2 is exported | ||
10637 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
10638 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
10639 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10640 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10641 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10642 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10643 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10644 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
10645 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10646 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10647 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10648 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10649 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10650 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
10651 | var_r1 != var_r2; | ||
10652 | } | ||
10653 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
10654 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10655 | var_s, var_v1, var_v2) | ||
10656 | { | ||
10657 | find interpretation(problem,interpretation); | ||
10658 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10659 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10660 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10661 | // s is exported | ||
10662 | // v1 is exported | ||
10663 | // v2 is exported | ||
10664 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
10665 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
10666 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10667 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10668 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10669 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10670 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10671 | var_virtual1 == var_v1; | ||
10672 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10673 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10674 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10675 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10676 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10677 | var_virtual3 == var_v2; | ||
10678 | var_r1 != var_r2; | ||
10679 | }or{ | ||
10680 | find interpretation(problem,interpretation); | ||
10681 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10682 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10683 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10684 | // s is exported | ||
10685 | // v1 is exported | ||
10686 | // v2 is exported | ||
10687 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
10688 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
10689 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10690 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10691 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10692 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10693 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10694 | var_virtual1 == var_v1; | ||
10695 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10696 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10697 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10698 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10699 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10700 | var_virtual3 == var_v2; | ||
10701 | var_r1 != var_r2; | ||
10702 | } | ||
10703 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
10704 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
10705 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10706 | var_parent, var_child) | ||
10707 | { | ||
10708 | find interpretation(problem,interpretation); | ||
10709 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10710 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
10711 | // parent is exported | ||
10712 | // child is exported | ||
10713 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10714 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
10715 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10716 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10717 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10718 | var_virtual1 == var_child; | ||
10719 | } | ||
10720 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
10721 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10722 | var_parent, var_child) | ||
10723 | { | ||
10724 | find interpretation(problem,interpretation); | ||
10725 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10726 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
10727 | // parent is exported | ||
10728 | // child is exported | ||
10729 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10730 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
10731 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10732 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10733 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10734 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
10735 | } | ||
10736 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
10737 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10738 | var_parent, var_child) | ||
10739 | { | ||
10740 | find interpretation(problem,interpretation); | ||
10741 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10742 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
10743 | // parent is exported | ||
10744 | // child is exported | ||
10745 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10746 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
10747 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10748 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10749 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10750 | var_virtual1 == var_child; | ||
10751 | } | ||
10752 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
10753 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
10754 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10755 | var_s, var_v) | ||
10756 | { | ||
10757 | find interpretation(problem,interpretation); | ||
10758 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10759 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
10760 | // s is exported | ||
10761 | // v is exported | ||
10762 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
10763 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
10764 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
10765 | }or{ | ||
10766 | find interpretation(problem,interpretation); | ||
10767 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10768 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
10769 | // s is exported | ||
10770 | // v is exported | ||
10771 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
10772 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
10773 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
10774 | } | ||
10775 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
10776 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10777 | var_s, var_v) | ||
10778 | { | ||
10779 | find interpretation(problem,interpretation); | ||
10780 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10781 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
10782 | // s is exported | ||
10783 | // v is exported | ||
10784 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
10785 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
10786 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
10787 | }or{ | ||
10788 | find interpretation(problem,interpretation); | ||
10789 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10790 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
10791 | // s is exported | ||
10792 | // v is exported | ||
10793 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
10794 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
10795 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
10796 | } | ||
10797 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
10798 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10799 | var_s, var_v) | ||
10800 | { | ||
10801 | find interpretation(problem,interpretation); | ||
10802 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10803 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
10804 | // s is exported | ||
10805 | // v is exported | ||
10806 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
10807 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
10808 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
10809 | }or{ | ||
10810 | find interpretation(problem,interpretation); | ||
10811 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10812 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
10813 | // s is exported | ||
10814 | // v is exported | ||
10815 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
10816 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
10817 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
10818 | } | ||
10819 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
10820 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
10821 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10822 | var_composite) | ||
10823 | { | ||
10824 | find interpretation(problem,interpretation); | ||
10825 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10826 | // composite is exported | ||
10827 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10828 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
10829 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10830 | var_virtual0 == var_region1; | ||
10831 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10832 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
10833 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
10834 | var_virtual1 == var_region2; | ||
10835 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
10836 | } | ||
10837 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
10838 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10839 | var_composite) | ||
10840 | { | ||
10841 | find interpretation(problem,interpretation); | ||
10842 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10843 | // composite is exported | ||
10844 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10845 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
10846 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10847 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
10848 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10849 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
10850 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
10851 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
10852 | var_region1 != var_region2; | ||
10853 | } | ||
10854 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
10855 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10856 | var_composite) | ||
10857 | { | ||
10858 | find interpretation(problem,interpretation); | ||
10859 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10860 | // composite is exported | ||
10861 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10862 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
10863 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10864 | var_virtual0 == var_region1; | ||
10865 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
10866 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
10867 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
10868 | var_virtual1 == var_region2; | ||
10869 | var_region1 != var_region2; | ||
10870 | } | ||
10871 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
10872 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
10873 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10874 | var_s) | ||
10875 | { | ||
10876 | find interpretation(problem,interpretation); | ||
10877 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10878 | // s is exported | ||
10879 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10880 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
10881 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10882 | var_virtual0 == var_s; | ||
10883 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10884 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
10885 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10886 | var_virtual1 == var_s; | ||
10887 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
10888 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
10889 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
10890 | var_virtual2 == var_s; | ||
10891 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10892 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
10893 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
10894 | }or{ | ||
10895 | find interpretation(problem,interpretation); | ||
10896 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10897 | // s is exported | ||
10898 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10899 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
10900 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10901 | var_virtual0 == var_s; | ||
10902 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10903 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
10904 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10905 | var_virtual1 == var_s; | ||
10906 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
10907 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
10908 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
10909 | var_virtual2 == var_s; | ||
10910 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10911 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
10912 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
10913 | } | ||
10914 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
10915 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10916 | var_s) | ||
10917 | { | ||
10918 | find interpretation(problem,interpretation); | ||
10919 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10920 | // s is exported | ||
10921 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10922 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
10923 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10924 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
10925 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10926 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
10927 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10928 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
10929 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
10930 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
10931 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
10932 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
10933 | var_t1 != var_t2; | ||
10934 | var_t2 != var_t3; | ||
10935 | var_t1 != var_t3; | ||
10936 | }or{ | ||
10937 | find interpretation(problem,interpretation); | ||
10938 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10939 | // s is exported | ||
10940 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10941 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
10942 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10943 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
10944 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10945 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
10946 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10947 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
10948 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
10949 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
10950 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
10951 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
10952 | var_t1 != var_t2; | ||
10953 | var_t2 != var_t3; | ||
10954 | var_t1 != var_t3; | ||
10955 | } | ||
10956 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
10957 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10958 | var_s) | ||
10959 | { | ||
10960 | find interpretation(problem,interpretation); | ||
10961 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10962 | // s is exported | ||
10963 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10964 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
10965 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10966 | var_virtual0 == var_s; | ||
10967 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10968 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
10969 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10970 | var_virtual1 == var_s; | ||
10971 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
10972 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
10973 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
10974 | var_virtual2 == var_s; | ||
10975 | var_t1 != var_t2; | ||
10976 | var_t2 != var_t3; | ||
10977 | var_t1 != var_t3; | ||
10978 | }or{ | ||
10979 | find interpretation(problem,interpretation); | ||
10980 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10981 | // s is exported | ||
10982 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10983 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
10984 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10985 | var_virtual0 == var_s; | ||
10986 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10987 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
10988 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10989 | var_virtual1 == var_s; | ||
10990 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
10991 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
10992 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
10993 | var_virtual2 == var_s; | ||
10994 | var_t1 != var_t2; | ||
10995 | var_t2 != var_t3; | ||
10996 | var_t1 != var_t3; | ||
10997 | } | ||
10998 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
10999 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
11000 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11001 | var_s1, var_s2) | ||
11002 | { | ||
11003 | find interpretation(problem,interpretation); | ||
11004 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11005 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11006 | // s1 is exported | ||
11007 | // s2 is exported | ||
11008 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11009 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11010 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
11011 | } | ||
11012 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
11013 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11014 | var_s1, var_s2) | ||
11015 | { | ||
11016 | find interpretation(problem,interpretation); | ||
11017 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11018 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11019 | // s1 is exported | ||
11020 | // s2 is exported | ||
11021 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11022 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11023 | var_s1 != var_s2; | ||
11024 | } | ||
11025 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
11026 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11027 | var_s1, var_s2) | ||
11028 | { | ||
11029 | find interpretation(problem,interpretation); | ||
11030 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11031 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11032 | // s1 is exported | ||
11033 | // s2 is exported | ||
11034 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11035 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11036 | var_s1 != var_s2; | ||
11037 | } | ||
11038 | |||
11039 | ////////// | ||
11040 | // 1.4 Containment Indexer | ||
11041 | ////////// | ||
11042 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
11043 | find mustContains4(_,_,source,target); | ||
11044 | } | ||
11045 | |||
11046 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11047 | source: DefinedElement, target: DefinedElement) | ||
11048 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
11049 | |||
11050 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
11051 | |||
11052 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
11053 | |||
11054 | private pattern mustTransitiveContains(source,target) { | ||
11055 | find mustContains2+(source,target); | ||
11056 | } | ||
11057 | |||
11058 | ////////// | ||
11059 | // 2. Invalidation Indexers | ||
11060 | ////////// | ||
11061 | // 2.1 Invalidated by WF Queries | ||
11062 | ////////// | ||
11063 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11064 | var_r1) | ||
11065 | { | ||
11066 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
11067 | } | ||
11068 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11069 | var_r) | ||
11070 | { | ||
11071 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
11072 | } | ||
11073 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11074 | var_t, var_e) | ||
11075 | { | ||
11076 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
11077 | } | ||
11078 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11079 | var_e) | ||
11080 | { | ||
11081 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
11082 | } | ||
11083 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11084 | var_e, var_t1, var_t2) | ||
11085 | { | ||
11086 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
11087 | } | ||
11088 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11089 | var_t, var_e) | ||
11090 | { | ||
11091 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
11092 | } | ||
11093 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11094 | var_t, var_f) | ||
11095 | { | ||
11096 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
11097 | } | ||
11098 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11099 | var_region) | ||
11100 | { | ||
11101 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
11102 | } | ||
11103 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11104 | var_c) | ||
11105 | { | ||
11106 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
11107 | } | ||
11108 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11109 | var_c) | ||
11110 | { | ||
11111 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
11112 | } | ||
11113 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11114 | var_s) | ||
11115 | { | ||
11116 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
11117 | } | ||
11118 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11119 | var_s) | ||
11120 | { | ||
11121 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
11122 | } | ||
11123 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11124 | var_s, var_v1, var_v2) | ||
11125 | { | ||
11126 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
11127 | } | ||
11128 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11129 | var_s) | ||
11130 | { | ||
11131 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
11132 | } | ||
11133 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11134 | var_s, var_v1, var_v2) | ||
11135 | { | ||
11136 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
11137 | } | ||
11138 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11139 | var_s, var_v) | ||
11140 | { | ||
11141 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
11142 | } | ||
11143 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11144 | var_s) | ||
11145 | { | ||
11146 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
11147 | } | ||
11148 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11149 | var_s1, var_s2) | ||
11150 | { | ||
11151 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
11152 | } | ||
11153 | |||
11154 | ////////// | ||
11155 | // 3. Unfinishedness Indexers | ||
11156 | ////////// | ||
11157 | // 3.1 Unfinishedness Measured by Multiplicity | ||
11158 | ////////// | ||
11159 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
11160 | find interpretation(problem,interpretation); | ||
11161 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11162 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
11163 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
11164 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
11165 | check(numberOfExistingReferences < 1); | ||
11166 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
11167 | } | ||
11168 | |||
11169 | ////////// | ||
11170 | // 3.2 Unfinishedness Measured by WF Queries | ||
11171 | ////////// | ||
11172 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11173 | var_r1) | ||
11174 | { | ||
11175 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
11176 | } | ||
11177 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11178 | var_r) | ||
11179 | { | ||
11180 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
11181 | } | ||
11182 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11183 | var_t, var_e) | ||
11184 | { | ||
11185 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
11186 | } | ||
11187 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11188 | var_e) | ||
11189 | { | ||
11190 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
11191 | } | ||
11192 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11193 | var_e, var_t1, var_t2) | ||
11194 | { | ||
11195 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
11196 | } | ||
11197 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11198 | var_t, var_e) | ||
11199 | { | ||
11200 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
11201 | } | ||
11202 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11203 | var_t, var_f) | ||
11204 | { | ||
11205 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
11206 | } | ||
11207 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11208 | var_region) | ||
11209 | { | ||
11210 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
11211 | } | ||
11212 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11213 | var_c) | ||
11214 | { | ||
11215 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
11216 | } | ||
11217 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11218 | var_c) | ||
11219 | { | ||
11220 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
11221 | } | ||
11222 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11223 | var_s) | ||
11224 | { | ||
11225 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
11226 | } | ||
11227 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11228 | var_s) | ||
11229 | { | ||
11230 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
11231 | } | ||
11232 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11233 | var_s, var_v1, var_v2) | ||
11234 | { | ||
11235 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
11236 | } | ||
11237 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11238 | var_s) | ||
11239 | { | ||
11240 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
11241 | } | ||
11242 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11243 | var_s, var_v1, var_v2) | ||
11244 | { | ||
11245 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
11246 | } | ||
11247 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11248 | var_s, var_v) | ||
11249 | { | ||
11250 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
11251 | } | ||
11252 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11253 | var_s) | ||
11254 | { | ||
11255 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
11256 | } | ||
11257 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11258 | var_s1, var_s2) | ||
11259 | { | ||
11260 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
11261 | } | ||
11262 | |||
11263 | ////////// | ||
11264 | // 4. Refinement Indexers | ||
11265 | ////////// | ||
11266 | // 4.1 Object constructors | ||
11267 | ////////// | ||
11268 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
11269 | { | ||
11270 | find interpretation(problem,interpretation); | ||
11271 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
11272 | find mustExist(problem, interpretation, root); | ||
11273 | }or{ | ||
11274 | find interpretation(problem,interpretation); | ||
11275 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
11276 | find mustExist(problem, interpretation, root); | ||
11277 | }or{ | ||
11278 | find interpretation(problem,interpretation); | ||
11279 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
11280 | find mustExist(problem, interpretation, root); | ||
11281 | }or{ | ||
11282 | find interpretation(problem,interpretation); | ||
11283 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
11284 | find mustExist(problem, interpretation, root); | ||
11285 | }or{ | ||
11286 | find interpretation(problem,interpretation); | ||
11287 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
11288 | find mustExist(problem, interpretation, root); | ||
11289 | }or{ | ||
11290 | find interpretation(problem,interpretation); | ||
11291 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
11292 | find mustExist(problem, interpretation, root); | ||
11293 | }or{ | ||
11294 | find interpretation(problem,interpretation); | ||
11295 | find mustInstanceOfState_class(problem,interpretation,root); | ||
11296 | find mustExist(problem, interpretation, root); | ||
11297 | }or{ | ||
11298 | find interpretation(problem,interpretation); | ||
11299 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
11300 | find mustExist(problem, interpretation, root); | ||
11301 | }or{ | ||
11302 | find interpretation(problem,interpretation); | ||
11303 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
11304 | find mustExist(problem, interpretation, root); | ||
11305 | }or{ | ||
11306 | find interpretation(problem,interpretation); | ||
11307 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
11308 | find mustExist(problem, interpretation, root); | ||
11309 | }or{ | ||
11310 | find interpretation(problem,interpretation); | ||
11311 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
11312 | find mustExist(problem, interpretation, root); | ||
11313 | }or{ | ||
11314 | find interpretation(problem,interpretation); | ||
11315 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
11316 | find mustExist(problem, interpretation, root); | ||
11317 | }or{ | ||
11318 | find interpretation(problem,interpretation); | ||
11319 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
11320 | find mustExist(problem, interpretation, root); | ||
11321 | }or{ | ||
11322 | find interpretation(problem,interpretation); | ||
11323 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
11324 | find mustExist(problem, interpretation, root); | ||
11325 | }or{ | ||
11326 | find interpretation(problem,interpretation); | ||
11327 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
11328 | find mustExist(problem, interpretation, root); | ||
11329 | }or{ | ||
11330 | find interpretation(problem,interpretation); | ||
11331 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
11332 | find mustExist(problem, interpretation, root); | ||
11333 | }or{ | ||
11334 | find interpretation(problem,interpretation); | ||
11335 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
11336 | find mustExist(problem, interpretation, root); | ||
11337 | } | ||
11338 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
11339 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11340 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11341 | container:DefinedElement) | ||
11342 | { | ||
11343 | find interpretation(problem,interpretation); | ||
11344 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11345 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
11346 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11347 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
11348 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
11349 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
11350 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
11351 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
11352 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
11353 | find mustExist(problem, interpretation, container); | ||
11354 | neg find mustExist(problem, interpretation, newObject); | ||
11355 | } | ||
11356 | pattern createObject_Transition_class( | ||
11357 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11358 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11359 | { | ||
11360 | find interpretation(problem,interpretation); | ||
11361 | neg find hasElementInContainment(problem,interpretation); | ||
11362 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11363 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
11364 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
11365 | find mayExist(problem, interpretation, newObject); | ||
11366 | neg find mustExist(problem, interpretation, newObject); | ||
11367 | } | ||
11368 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
11369 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11370 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11371 | container:DefinedElement) | ||
11372 | { | ||
11373 | find interpretation(problem,interpretation); | ||
11374 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11375 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
11376 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11377 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11378 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11379 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
11380 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11381 | find mustExist(problem, interpretation, container); | ||
11382 | neg find mustExist(problem, interpretation, newObject); | ||
11383 | } | ||
11384 | pattern createObject_Choice_class( | ||
11385 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11386 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11387 | { | ||
11388 | find interpretation(problem,interpretation); | ||
11389 | neg find hasElementInContainment(problem,interpretation); | ||
11390 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11391 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
11392 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
11393 | find mayExist(problem, interpretation, newObject); | ||
11394 | neg find mustExist(problem, interpretation, newObject); | ||
11395 | } | ||
11396 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
11397 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11398 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11399 | container:DefinedElement) | ||
11400 | { | ||
11401 | find interpretation(problem,interpretation); | ||
11402 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11403 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
11404 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11405 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11406 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11407 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
11408 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11409 | find mustExist(problem, interpretation, container); | ||
11410 | neg find mustExist(problem, interpretation, newObject); | ||
11411 | } | ||
11412 | pattern createObject_Exit_class( | ||
11413 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11414 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11415 | { | ||
11416 | find interpretation(problem,interpretation); | ||
11417 | neg find hasElementInContainment(problem,interpretation); | ||
11418 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11419 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
11420 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
11421 | find mayExist(problem, interpretation, newObject); | ||
11422 | neg find mustExist(problem, interpretation, newObject); | ||
11423 | } | ||
11424 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
11425 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11426 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11427 | container:DefinedElement) | ||
11428 | { | ||
11429 | find interpretation(problem,interpretation); | ||
11430 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11431 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
11432 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11433 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11434 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11435 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
11436 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11437 | find mustExist(problem, interpretation, container); | ||
11438 | neg find mustExist(problem, interpretation, newObject); | ||
11439 | } | ||
11440 | pattern createObject_Entry_class( | ||
11441 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11442 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11443 | { | ||
11444 | find interpretation(problem,interpretation); | ||
11445 | neg find hasElementInContainment(problem,interpretation); | ||
11446 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11447 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
11448 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
11449 | find mayExist(problem, interpretation, newObject); | ||
11450 | neg find mustExist(problem, interpretation, newObject); | ||
11451 | } | ||
11452 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
11453 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11454 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11455 | container:DefinedElement) | ||
11456 | { | ||
11457 | find interpretation(problem,interpretation); | ||
11458 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11459 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
11460 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11461 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
11462 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
11463 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
11464 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
11465 | find mustExist(problem, interpretation, container); | ||
11466 | neg find mustExist(problem, interpretation, newObject); | ||
11467 | } | ||
11468 | pattern createObject_Region_class( | ||
11469 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11470 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11471 | { | ||
11472 | find interpretation(problem,interpretation); | ||
11473 | neg find hasElementInContainment(problem,interpretation); | ||
11474 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11475 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
11476 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
11477 | find mayExist(problem, interpretation, newObject); | ||
11478 | neg find mustExist(problem, interpretation, newObject); | ||
11479 | } | ||
11480 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
11481 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11482 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11483 | container:DefinedElement) | ||
11484 | { | ||
11485 | find interpretation(problem,interpretation); | ||
11486 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11487 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
11488 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11489 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11490 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11491 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
11492 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11493 | find mustExist(problem, interpretation, container); | ||
11494 | neg find mustExist(problem, interpretation, newObject); | ||
11495 | } | ||
11496 | pattern createObject_Synchronization_class( | ||
11497 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11498 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11499 | { | ||
11500 | find interpretation(problem,interpretation); | ||
11501 | neg find hasElementInContainment(problem,interpretation); | ||
11502 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11503 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
11504 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
11505 | find mayExist(problem, interpretation, newObject); | ||
11506 | neg find mustExist(problem, interpretation, newObject); | ||
11507 | } | ||
11508 | pattern createObject_Statechart_class_UndefinedPart( | ||
11509 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11510 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11511 | { | ||
11512 | find interpretation(problem,interpretation); | ||
11513 | neg find hasElementInContainment(problem,interpretation); | ||
11514 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11515 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
11516 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
11517 | find mayExist(problem, interpretation, newObject); | ||
11518 | neg find mustExist(problem, interpretation, newObject); | ||
11519 | } | ||
11520 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
11521 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11522 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11523 | container:DefinedElement) | ||
11524 | { | ||
11525 | find interpretation(problem,interpretation); | ||
11526 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11527 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
11528 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11529 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11530 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11531 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
11532 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11533 | find mustExist(problem, interpretation, container); | ||
11534 | neg find mustExist(problem, interpretation, newObject); | ||
11535 | } | ||
11536 | pattern createObject_FinalState_class( | ||
11537 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11538 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11539 | { | ||
11540 | find interpretation(problem,interpretation); | ||
11541 | neg find hasElementInContainment(problem,interpretation); | ||
11542 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11543 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
11544 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
11545 | find mayExist(problem, interpretation, newObject); | ||
11546 | neg find mustExist(problem, interpretation, newObject); | ||
11547 | } | ||
11548 | pattern createObject_State_class_by_vertices_reference_Region( | ||
11549 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11550 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11551 | container:DefinedElement) | ||
11552 | { | ||
11553 | find interpretation(problem,interpretation); | ||
11554 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11555 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
11556 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11557 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11558 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11559 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
11560 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11561 | find mustExist(problem, interpretation, container); | ||
11562 | neg find mustExist(problem, interpretation, newObject); | ||
11563 | } | ||
11564 | pattern createObject_State_class( | ||
11565 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11566 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11567 | { | ||
11568 | find interpretation(problem,interpretation); | ||
11569 | neg find hasElementInContainment(problem,interpretation); | ||
11570 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11571 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
11572 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
11573 | find mayExist(problem, interpretation, newObject); | ||
11574 | neg find mustExist(problem, interpretation, newObject); | ||
11575 | } | ||
11576 | |||
11577 | ////////// | ||
11578 | // 4.2 Type refinement | ||
11579 | ////////// | ||
11580 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11581 | find interpretation(problem,interpretation); | ||
11582 | PartialInterpretation.newElements(interpretation,element); | ||
11583 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
11584 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11585 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11586 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11587 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11588 | } | ||
11589 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11590 | find interpretation(problem,interpretation); | ||
11591 | PartialInterpretation.newElements(interpretation,element); | ||
11592 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
11593 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11594 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11595 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11596 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11597 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11598 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11599 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11600 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11601 | } | ||
11602 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11603 | find interpretation(problem,interpretation); | ||
11604 | PartialInterpretation.newElements(interpretation,element); | ||
11605 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
11606 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11607 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11608 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11609 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11610 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11611 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11612 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11613 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11614 | } | ||
11615 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11616 | find interpretation(problem,interpretation); | ||
11617 | PartialInterpretation.newElements(interpretation,element); | ||
11618 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
11619 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11620 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11621 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11622 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11623 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11624 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11625 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11626 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11627 | } | ||
11628 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11629 | find interpretation(problem,interpretation); | ||
11630 | PartialInterpretation.newElements(interpretation,element); | ||
11631 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
11632 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11633 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11634 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11635 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11636 | } | ||
11637 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11638 | find interpretation(problem,interpretation); | ||
11639 | PartialInterpretation.newElements(interpretation,element); | ||
11640 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
11641 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11642 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11643 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11644 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11645 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11646 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11647 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11648 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11649 | } | ||
11650 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11651 | find interpretation(problem,interpretation); | ||
11652 | PartialInterpretation.newElements(interpretation,element); | ||
11653 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
11654 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11655 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11656 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11657 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
11658 | } | ||
11659 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11660 | find interpretation(problem,interpretation); | ||
11661 | PartialInterpretation.newElements(interpretation,element); | ||
11662 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
11663 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11664 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
11665 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11666 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11667 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
11668 | } | ||
11669 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11670 | find interpretation(problem,interpretation); | ||
11671 | PartialInterpretation.newElements(interpretation,element); | ||
11672 | find mayInstanceOfState_class(problem,interpretation,element); | ||
11673 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11674 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
11675 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
11676 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11677 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
11678 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
11679 | } | ||
11680 | |||
11681 | ////////// | ||
11682 | // 4.3 Relation refinement | ||
11683 | ////////// | ||
11684 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
11685 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11686 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
11687 | from: DefinedElement, to: DefinedElement) | ||
11688 | { | ||
11689 | find interpretation(problem,interpretation); | ||
11690 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11691 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
11692 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
11693 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
11694 | find mustExist(problem, interpretation, from); | ||
11695 | find mustExist(problem, interpretation, to); | ||
11696 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
11697 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
11698 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
11699 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
11700 | } | ||
11701 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
11702 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
11703 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
11704 | |||
11705 | ////////// | ||
11706 | // 0. Util | ||
11707 | ////////// | ||
11708 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11709 | PartialInterpretation.problem(interpretation,problem); | ||
11710 | } | ||
11711 | |||
11712 | ///////////////////////// | ||
11713 | // 0.1 Existence | ||
11714 | ///////////////////////// | ||
11715 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11716 | find interpretation(problem,interpretation); | ||
11717 | LogicProblem.elements(problem,element); | ||
11718 | } or { | ||
11719 | find interpretation(problem,interpretation); | ||
11720 | PartialInterpretation.newElements(interpretation,element); | ||
11721 | } | ||
11722 | |||
11723 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11724 | find mustExist(problem,interpretation,element); | ||
11725 | } or { | ||
11726 | find interpretation(problem,interpretation); | ||
11727 | neg find elementCloseWorld(element); | ||
11728 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11729 | } | ||
11730 | |||
11731 | private pattern elementCloseWorld(element:DefinedElement) { | ||
11732 | PartialInterpretation.openWorldElements(i,element); | ||
11733 | PartialInterpretation.maxNewElements(i,0); | ||
11734 | } or { | ||
11735 | Scope.targetTypeInterpretation(scope,interpretation); | ||
11736 | PartialTypeInterpratation.elements(interpretation,element); | ||
11737 | Scope.maxNewElements(scope,0); | ||
11738 | } | ||
11739 | |||
11740 | //////////////////////// | ||
11741 | // 0.2 Equivalence | ||
11742 | //////////////////////// | ||
11743 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
11744 | find mayExist(problem,interpretation,a); | ||
11745 | find mayExist(problem,interpretation,b); | ||
11746 | a == b; | ||
11747 | } | ||
11748 | |||
11749 | //////////////////////// | ||
11750 | // 0.3 Required Patterns by TypeIndexer | ||
11751 | //////////////////////// | ||
11752 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
11753 | find interpretation(problem,interpretation); | ||
11754 | LogicProblem.types(problem,type); | ||
11755 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11756 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11757 | } | ||
11758 | |||
11759 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
11760 | find interpretation(problem,interpretation); | ||
11761 | LogicProblem.types(problem,type); | ||
11762 | TypeDefinition.elements(type,element); | ||
11763 | } or { | ||
11764 | find interpretation(problem,interpretation); | ||
11765 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
11766 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
11767 | } | ||
11768 | |||
11769 | private pattern isPrimitive(element: PrimitiveElement) { | ||
11770 | PrimitiveElement(element); | ||
11771 | } | ||
11772 | |||
11773 | ////////// | ||
11774 | // 1. Problem-Specific Base Indexers | ||
11775 | ////////// | ||
11776 | // 1.1 Type Indexers | ||
11777 | ////////// | ||
11778 | // 1.1.1 primitive Type Indexers | ||
11779 | ////////// | ||
11780 | |||
11781 | ////////// | ||
11782 | // 1.1.2 domain-specific Type Indexers | ||
11783 | ////////// | ||
11784 | /** | ||
11785 | * An element must be an instance of type "Pseudostate class". | ||
11786 | */ | ||
11787 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11788 | Type.name(type,"Pseudostate class"); | ||
11789 | find directInstanceOf(problem,interpretation,element,type); | ||
11790 | } | ||
11791 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11792 | find interpretation(problem,interpretation); | ||
11793 | PartialInterpretation.scopes(interpretation,scope); | ||
11794 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11795 | Scope.maxNewElements(scope,0); | ||
11796 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11797 | Type.name(type,"Pseudostate class"); | ||
11798 | } | ||
11799 | |||
11800 | /** | ||
11801 | * An element may be an instance of type "Pseudostate class". | ||
11802 | */ | ||
11803 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11804 | { | ||
11805 | find interpretation(problem,interpretation); | ||
11806 | PartialInterpretation.newElements(interpretation,element); | ||
11807 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11808 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11809 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11810 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11811 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11812 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11813 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11814 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11815 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
11816 | neg find isPrimitive(element); | ||
11817 | } or { | ||
11818 | find interpretation(problem,interpretation); | ||
11819 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11820 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11821 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11822 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11823 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11824 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11825 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11826 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11827 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11828 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
11829 | neg find isPrimitive(element); | ||
11830 | } or | ||
11831 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
11832 | /** | ||
11833 | * An element must be an instance of type "Vertex class". | ||
11834 | */ | ||
11835 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11836 | Type.name(type,"Vertex class"); | ||
11837 | find directInstanceOf(problem,interpretation,element,type); | ||
11838 | } | ||
11839 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11840 | find interpretation(problem,interpretation); | ||
11841 | PartialInterpretation.scopes(interpretation,scope); | ||
11842 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11843 | Scope.maxNewElements(scope,0); | ||
11844 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11845 | Type.name(type,"Vertex class"); | ||
11846 | } | ||
11847 | |||
11848 | /** | ||
11849 | * An element may be an instance of type "Vertex class". | ||
11850 | */ | ||
11851 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11852 | { | ||
11853 | find interpretation(problem,interpretation); | ||
11854 | PartialInterpretation.newElements(interpretation,element); | ||
11855 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
11856 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11857 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11858 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11859 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11860 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
11861 | neg find isPrimitive(element); | ||
11862 | } or { | ||
11863 | find interpretation(problem,interpretation); | ||
11864 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11865 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
11866 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11867 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11868 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11869 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11870 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
11871 | neg find isPrimitive(element); | ||
11872 | } or | ||
11873 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
11874 | /** | ||
11875 | * An element must be an instance of type "Region class". | ||
11876 | */ | ||
11877 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11878 | Type.name(type,"Region class"); | ||
11879 | find directInstanceOf(problem,interpretation,element,type); | ||
11880 | } | ||
11881 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11882 | find interpretation(problem,interpretation); | ||
11883 | PartialInterpretation.scopes(interpretation,scope); | ||
11884 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11885 | Scope.maxNewElements(scope,0); | ||
11886 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11887 | Type.name(type,"Region class"); | ||
11888 | } | ||
11889 | |||
11890 | /** | ||
11891 | * An element may be an instance of type "Region class". | ||
11892 | */ | ||
11893 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11894 | { | ||
11895 | find interpretation(problem,interpretation); | ||
11896 | PartialInterpretation.newElements(interpretation,element); | ||
11897 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11898 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11899 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11900 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
11901 | neg find isPrimitive(element); | ||
11902 | } or { | ||
11903 | find interpretation(problem,interpretation); | ||
11904 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11905 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11906 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11907 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11908 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
11909 | neg find isPrimitive(element); | ||
11910 | } or | ||
11911 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
11912 | /** | ||
11913 | * An element must be an instance of type "Transition class". | ||
11914 | */ | ||
11915 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11916 | Type.name(type,"Transition class"); | ||
11917 | find directInstanceOf(problem,interpretation,element,type); | ||
11918 | } | ||
11919 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11920 | find interpretation(problem,interpretation); | ||
11921 | PartialInterpretation.scopes(interpretation,scope); | ||
11922 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11923 | Scope.maxNewElements(scope,0); | ||
11924 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11925 | Type.name(type,"Transition class"); | ||
11926 | } | ||
11927 | |||
11928 | /** | ||
11929 | * An element may be an instance of type "Transition class". | ||
11930 | */ | ||
11931 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11932 | { | ||
11933 | find interpretation(problem,interpretation); | ||
11934 | PartialInterpretation.newElements(interpretation,element); | ||
11935 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11936 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11937 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11938 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
11939 | neg find isPrimitive(element); | ||
11940 | } or { | ||
11941 | find interpretation(problem,interpretation); | ||
11942 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11943 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11944 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11945 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11946 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
11947 | neg find isPrimitive(element); | ||
11948 | } or | ||
11949 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
11950 | /** | ||
11951 | * An element must be an instance of type "Statechart class". | ||
11952 | */ | ||
11953 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11954 | Type.name(type,"Statechart class"); | ||
11955 | find directInstanceOf(problem,interpretation,element,type); | ||
11956 | } | ||
11957 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11958 | find interpretation(problem,interpretation); | ||
11959 | PartialInterpretation.scopes(interpretation,scope); | ||
11960 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11961 | Scope.maxNewElements(scope,0); | ||
11962 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11963 | Type.name(type,"Statechart class"); | ||
11964 | } | ||
11965 | |||
11966 | /** | ||
11967 | * An element may be an instance of type "Statechart class". | ||
11968 | */ | ||
11969 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11970 | { | ||
11971 | find interpretation(problem,interpretation); | ||
11972 | PartialInterpretation.newElements(interpretation,element); | ||
11973 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
11974 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11975 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11976 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11977 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
11978 | neg find isPrimitive(element); | ||
11979 | } or { | ||
11980 | find interpretation(problem,interpretation); | ||
11981 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11982 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
11983 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11984 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11985 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11986 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
11987 | neg find isPrimitive(element); | ||
11988 | } or | ||
11989 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
11990 | /** | ||
11991 | * An element must be an instance of type "Entry class". | ||
11992 | */ | ||
11993 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11994 | Type.name(type,"Entry class"); | ||
11995 | find directInstanceOf(problem,interpretation,element,type); | ||
11996 | } | ||
11997 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11998 | find interpretation(problem,interpretation); | ||
11999 | PartialInterpretation.scopes(interpretation,scope); | ||
12000 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12001 | Scope.maxNewElements(scope,0); | ||
12002 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12003 | Type.name(type,"Entry class"); | ||
12004 | } | ||
12005 | |||
12006 | /** | ||
12007 | * An element may be an instance of type "Entry class". | ||
12008 | */ | ||
12009 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12010 | { | ||
12011 | find interpretation(problem,interpretation); | ||
12012 | PartialInterpretation.newElements(interpretation,element); | ||
12013 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12014 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12015 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12016 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12017 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12018 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12019 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12020 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
12021 | neg find isPrimitive(element); | ||
12022 | } or { | ||
12023 | find interpretation(problem,interpretation); | ||
12024 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12025 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12026 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12027 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12028 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12029 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12030 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12031 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12032 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
12033 | neg find isPrimitive(element); | ||
12034 | } or | ||
12035 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
12036 | /** | ||
12037 | * An element must be an instance of type "Synchronization class". | ||
12038 | */ | ||
12039 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12040 | Type.name(type,"Synchronization class"); | ||
12041 | find directInstanceOf(problem,interpretation,element,type); | ||
12042 | } | ||
12043 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12044 | find interpretation(problem,interpretation); | ||
12045 | PartialInterpretation.scopes(interpretation,scope); | ||
12046 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12047 | Scope.maxNewElements(scope,0); | ||
12048 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12049 | Type.name(type,"Synchronization class"); | ||
12050 | } | ||
12051 | |||
12052 | /** | ||
12053 | * An element may be an instance of type "Synchronization class". | ||
12054 | */ | ||
12055 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12056 | { | ||
12057 | find interpretation(problem,interpretation); | ||
12058 | PartialInterpretation.newElements(interpretation,element); | ||
12059 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12060 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12061 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12062 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12063 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12064 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12065 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12066 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
12067 | neg find isPrimitive(element); | ||
12068 | } or { | ||
12069 | find interpretation(problem,interpretation); | ||
12070 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12071 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12072 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12073 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12074 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12075 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12076 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12077 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12078 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
12079 | neg find isPrimitive(element); | ||
12080 | } or | ||
12081 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
12082 | /** | ||
12083 | * An element must be an instance of type "State class". | ||
12084 | */ | ||
12085 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12086 | Type.name(type,"State class"); | ||
12087 | find directInstanceOf(problem,interpretation,element,type); | ||
12088 | } | ||
12089 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12090 | find interpretation(problem,interpretation); | ||
12091 | PartialInterpretation.scopes(interpretation,scope); | ||
12092 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12093 | Scope.maxNewElements(scope,0); | ||
12094 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12095 | Type.name(type,"State class"); | ||
12096 | } | ||
12097 | |||
12098 | /** | ||
12099 | * An element may be an instance of type "State class". | ||
12100 | */ | ||
12101 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12102 | { | ||
12103 | find interpretation(problem,interpretation); | ||
12104 | PartialInterpretation.newElements(interpretation,element); | ||
12105 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12106 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12107 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12108 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12109 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12110 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
12111 | neg find isPrimitive(element); | ||
12112 | } or { | ||
12113 | find interpretation(problem,interpretation); | ||
12114 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12115 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12116 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12117 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12118 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12119 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12120 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
12121 | neg find isPrimitive(element); | ||
12122 | } or | ||
12123 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
12124 | /** | ||
12125 | * An element must be an instance of type "RegularState class". | ||
12126 | */ | ||
12127 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12128 | Type.name(type,"RegularState class"); | ||
12129 | find directInstanceOf(problem,interpretation,element,type); | ||
12130 | } | ||
12131 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12132 | find interpretation(problem,interpretation); | ||
12133 | PartialInterpretation.scopes(interpretation,scope); | ||
12134 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12135 | Scope.maxNewElements(scope,0); | ||
12136 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12137 | Type.name(type,"RegularState class"); | ||
12138 | } | ||
12139 | |||
12140 | /** | ||
12141 | * An element may be an instance of type "RegularState class". | ||
12142 | */ | ||
12143 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12144 | { | ||
12145 | find interpretation(problem,interpretation); | ||
12146 | PartialInterpretation.newElements(interpretation,element); | ||
12147 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12148 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12149 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12150 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12151 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12152 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
12153 | neg find isPrimitive(element); | ||
12154 | } or { | ||
12155 | find interpretation(problem,interpretation); | ||
12156 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12157 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12158 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12159 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12160 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12161 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12162 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
12163 | neg find isPrimitive(element); | ||
12164 | } or | ||
12165 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
12166 | /** | ||
12167 | * An element must be an instance of type "CompositeElement class". | ||
12168 | */ | ||
12169 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12170 | Type.name(type,"CompositeElement class"); | ||
12171 | find directInstanceOf(problem,interpretation,element,type); | ||
12172 | } | ||
12173 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12174 | find interpretation(problem,interpretation); | ||
12175 | PartialInterpretation.scopes(interpretation,scope); | ||
12176 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12177 | Scope.maxNewElements(scope,0); | ||
12178 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12179 | Type.name(type,"CompositeElement class"); | ||
12180 | } | ||
12181 | |||
12182 | /** | ||
12183 | * An element may be an instance of type "CompositeElement class". | ||
12184 | */ | ||
12185 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12186 | { | ||
12187 | find interpretation(problem,interpretation); | ||
12188 | PartialInterpretation.newElements(interpretation,element); | ||
12189 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
12190 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12191 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12192 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12193 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12194 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
12195 | neg find isPrimitive(element); | ||
12196 | } or { | ||
12197 | find interpretation(problem,interpretation); | ||
12198 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12199 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
12200 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12201 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12202 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12203 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12204 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
12205 | neg find isPrimitive(element); | ||
12206 | } or | ||
12207 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
12208 | /** | ||
12209 | * An element must be an instance of type "Choice class". | ||
12210 | */ | ||
12211 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12212 | Type.name(type,"Choice class"); | ||
12213 | find directInstanceOf(problem,interpretation,element,type); | ||
12214 | } | ||
12215 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12216 | find interpretation(problem,interpretation); | ||
12217 | PartialInterpretation.scopes(interpretation,scope); | ||
12218 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12219 | Scope.maxNewElements(scope,0); | ||
12220 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12221 | Type.name(type,"Choice class"); | ||
12222 | } | ||
12223 | |||
12224 | /** | ||
12225 | * An element may be an instance of type "Choice class". | ||
12226 | */ | ||
12227 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12228 | { | ||
12229 | find interpretation(problem,interpretation); | ||
12230 | PartialInterpretation.newElements(interpretation,element); | ||
12231 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12232 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12233 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12234 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12235 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12236 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12237 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12238 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
12239 | neg find isPrimitive(element); | ||
12240 | } or { | ||
12241 | find interpretation(problem,interpretation); | ||
12242 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12243 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12244 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12245 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12246 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12247 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12248 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12249 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12250 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
12251 | neg find isPrimitive(element); | ||
12252 | } or | ||
12253 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
12254 | /** | ||
12255 | * An element must be an instance of type "Exit class". | ||
12256 | */ | ||
12257 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12258 | Type.name(type,"Exit class"); | ||
12259 | find directInstanceOf(problem,interpretation,element,type); | ||
12260 | } | ||
12261 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12262 | find interpretation(problem,interpretation); | ||
12263 | PartialInterpretation.scopes(interpretation,scope); | ||
12264 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12265 | Scope.maxNewElements(scope,0); | ||
12266 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12267 | Type.name(type,"Exit class"); | ||
12268 | } | ||
12269 | |||
12270 | /** | ||
12271 | * An element may be an instance of type "Exit class". | ||
12272 | */ | ||
12273 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12274 | { | ||
12275 | find interpretation(problem,interpretation); | ||
12276 | PartialInterpretation.newElements(interpretation,element); | ||
12277 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12278 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12279 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12280 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12281 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12282 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12283 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12284 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
12285 | neg find isPrimitive(element); | ||
12286 | } or { | ||
12287 | find interpretation(problem,interpretation); | ||
12288 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12289 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12290 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12291 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12292 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12293 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12294 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12295 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12296 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
12297 | neg find isPrimitive(element); | ||
12298 | } or | ||
12299 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
12300 | /** | ||
12301 | * An element must be an instance of type "FinalState class". | ||
12302 | */ | ||
12303 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12304 | Type.name(type,"FinalState class"); | ||
12305 | find directInstanceOf(problem,interpretation,element,type); | ||
12306 | } | ||
12307 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12308 | find interpretation(problem,interpretation); | ||
12309 | PartialInterpretation.scopes(interpretation,scope); | ||
12310 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12311 | Scope.maxNewElements(scope,0); | ||
12312 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12313 | Type.name(type,"FinalState class"); | ||
12314 | } | ||
12315 | |||
12316 | /** | ||
12317 | * An element may be an instance of type "FinalState class". | ||
12318 | */ | ||
12319 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12320 | { | ||
12321 | find interpretation(problem,interpretation); | ||
12322 | PartialInterpretation.newElements(interpretation,element); | ||
12323 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12324 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12325 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12326 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12327 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
12328 | neg find isPrimitive(element); | ||
12329 | } or { | ||
12330 | find interpretation(problem,interpretation); | ||
12331 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12332 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12333 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12334 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12335 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12336 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
12337 | neg find isPrimitive(element); | ||
12338 | } or | ||
12339 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
12340 | /** | ||
12341 | * An element must be an instance of type "Statechart class DefinedPart". | ||
12342 | */ | ||
12343 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12344 | Type.name(type,"Statechart class DefinedPart"); | ||
12345 | find directInstanceOf(problem,interpretation,element,type); | ||
12346 | } | ||
12347 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12348 | find interpretation(problem,interpretation); | ||
12349 | PartialInterpretation.scopes(interpretation,scope); | ||
12350 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12351 | Scope.maxNewElements(scope,0); | ||
12352 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12353 | Type.name(type,"Statechart class DefinedPart"); | ||
12354 | } | ||
12355 | |||
12356 | /** | ||
12357 | * An element may be an instance of type "Statechart class DefinedPart". | ||
12358 | */ | ||
12359 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12360 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
12361 | /** | ||
12362 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
12363 | */ | ||
12364 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12365 | Type.name(type,"Statechart class UndefinedPart"); | ||
12366 | find directInstanceOf(problem,interpretation,element,type); | ||
12367 | } | ||
12368 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12369 | find interpretation(problem,interpretation); | ||
12370 | PartialInterpretation.scopes(interpretation,scope); | ||
12371 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12372 | Scope.maxNewElements(scope,0); | ||
12373 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12374 | Type.name(type,"Statechart class UndefinedPart"); | ||
12375 | } | ||
12376 | |||
12377 | /** | ||
12378 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
12379 | */ | ||
12380 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12381 | { | ||
12382 | find interpretation(problem,interpretation); | ||
12383 | PartialInterpretation.newElements(interpretation,element); | ||
12384 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12385 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12386 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12387 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
12388 | neg find isPrimitive(element); | ||
12389 | } or { | ||
12390 | find interpretation(problem,interpretation); | ||
12391 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12392 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12393 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12394 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12395 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
12396 | neg find isPrimitive(element); | ||
12397 | } or | ||
12398 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
12399 | /** | ||
12400 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
12401 | */ | ||
12402 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12403 | Type.name(type,"CompositeElement class DefinedPart"); | ||
12404 | find directInstanceOf(problem,interpretation,element,type); | ||
12405 | } | ||
12406 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12407 | find interpretation(problem,interpretation); | ||
12408 | PartialInterpretation.scopes(interpretation,scope); | ||
12409 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12410 | Scope.maxNewElements(scope,0); | ||
12411 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12412 | Type.name(type,"CompositeElement class DefinedPart"); | ||
12413 | } | ||
12414 | |||
12415 | /** | ||
12416 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
12417 | */ | ||
12418 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12419 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
12420 | /** | ||
12421 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
12422 | */ | ||
12423 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12424 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
12425 | find directInstanceOf(problem,interpretation,element,type); | ||
12426 | } | ||
12427 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12428 | find interpretation(problem,interpretation); | ||
12429 | PartialInterpretation.scopes(interpretation,scope); | ||
12430 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12431 | Scope.maxNewElements(scope,0); | ||
12432 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12433 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
12434 | } | ||
12435 | |||
12436 | /** | ||
12437 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
12438 | */ | ||
12439 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12440 | { | ||
12441 | find interpretation(problem,interpretation); | ||
12442 | PartialInterpretation.newElements(interpretation,element); | ||
12443 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12444 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12445 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12446 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12447 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
12448 | neg find isPrimitive(element); | ||
12449 | } or { | ||
12450 | find interpretation(problem,interpretation); | ||
12451 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12452 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12453 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12454 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12455 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12456 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
12457 | neg find isPrimitive(element); | ||
12458 | } or | ||
12459 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
12460 | |||
12461 | ////////// | ||
12462 | // 1.2 Relation Declaration Indexers | ||
12463 | ////////// | ||
12464 | /** | ||
12465 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
12466 | */ | ||
12467 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
12468 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12469 | source: DefinedElement, target:DefinedElement) | ||
12470 | { | ||
12471 | find interpretation(problem,interpretation); | ||
12472 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12473 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
12474 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12475 | BinaryElementRelationLink.param1(link,source); | ||
12476 | BinaryElementRelationLink.param2(link,target); | ||
12477 | } | ||
12478 | /** | ||
12479 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
12480 | */ | ||
12481 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
12482 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12483 | source: DefinedElement, target:DefinedElement) | ||
12484 | { | ||
12485 | find interpretation(problem,interpretation); | ||
12486 | // The two endpoint of the link have to exist | ||
12487 | find mayExist(problem, interpretation, source); | ||
12488 | find mayExist(problem, interpretation, target); | ||
12489 | // Type consistency | ||
12490 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
12491 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
12492 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
12493 | // the upper bound of the opposite reference multiplicity should be considered. | ||
12494 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
12495 | check(numberOfExistingOppositeReferences < 1); | ||
12496 | } or { | ||
12497 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
12498 | } | ||
12499 | /** | ||
12500 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
12501 | */ | ||
12502 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
12503 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12504 | source: DefinedElement, target:DefinedElement) | ||
12505 | { | ||
12506 | find interpretation(problem,interpretation); | ||
12507 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12508 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
12509 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12510 | BinaryElementRelationLink.param1(link,source); | ||
12511 | BinaryElementRelationLink.param2(link,target); | ||
12512 | } | ||
12513 | /** | ||
12514 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
12515 | */ | ||
12516 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
12517 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12518 | source: DefinedElement, target:DefinedElement) | ||
12519 | { | ||
12520 | find interpretation(problem,interpretation); | ||
12521 | // The two endpoint of the link have to exist | ||
12522 | find mayExist(problem, interpretation, source); | ||
12523 | find mayExist(problem, interpretation, target); | ||
12524 | // Type consistency | ||
12525 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
12526 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
12527 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
12528 | // the upper bound of the opposite reference multiplicity should be considered. | ||
12529 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
12530 | check(numberOfExistingOppositeReferences < 1); | ||
12531 | // The reference is containment, then a new reference cannot be create if: | ||
12532 | // 1. Multiple parents | ||
12533 | neg find mustContains4(problem,interpretation,_,target); | ||
12534 | // 2. Circle in the containment hierarchy | ||
12535 | neg find mustTransitiveContains(source,target); | ||
12536 | } or { | ||
12537 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
12538 | } | ||
12539 | /** | ||
12540 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
12541 | */ | ||
12542 | private pattern mustInRelationvertices_reference_Region( | ||
12543 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12544 | source: DefinedElement, target:DefinedElement) | ||
12545 | { | ||
12546 | find interpretation(problem,interpretation); | ||
12547 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12548 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
12549 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12550 | BinaryElementRelationLink.param1(link,source); | ||
12551 | BinaryElementRelationLink.param2(link,target); | ||
12552 | } | ||
12553 | /** | ||
12554 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
12555 | */ | ||
12556 | private pattern mayInRelationvertices_reference_Region( | ||
12557 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12558 | source: DefinedElement, target:DefinedElement) | ||
12559 | { | ||
12560 | find interpretation(problem,interpretation); | ||
12561 | // The two endpoint of the link have to exist | ||
12562 | find mayExist(problem, interpretation, source); | ||
12563 | find mayExist(problem, interpretation, target); | ||
12564 | // Type consistency | ||
12565 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
12566 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
12567 | // The reference is containment, then a new reference cannot be create if: | ||
12568 | // 1. Multiple parents | ||
12569 | neg find mustContains4(problem,interpretation,_,target); | ||
12570 | // 2. Circle in the containment hierarchy | ||
12571 | neg find mustTransitiveContains(source,target); | ||
12572 | } or { | ||
12573 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
12574 | } | ||
12575 | /** | ||
12576 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
12577 | */ | ||
12578 | private pattern mustInRelationtarget_reference_Transition( | ||
12579 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12580 | source: DefinedElement, target:DefinedElement) | ||
12581 | { | ||
12582 | find interpretation(problem,interpretation); | ||
12583 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12584 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
12585 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12586 | BinaryElementRelationLink.param1(link,source); | ||
12587 | BinaryElementRelationLink.param2(link,target); | ||
12588 | } | ||
12589 | /** | ||
12590 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
12591 | */ | ||
12592 | private pattern mayInRelationtarget_reference_Transition( | ||
12593 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12594 | source: DefinedElement, target:DefinedElement) | ||
12595 | { | ||
12596 | find interpretation(problem,interpretation); | ||
12597 | // The two endpoint of the link have to exist | ||
12598 | find mayExist(problem, interpretation, source); | ||
12599 | find mayExist(problem, interpretation, target); | ||
12600 | // Type consistency | ||
12601 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
12602 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
12603 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
12604 | // the upper bound of the multiplicity should be considered. | ||
12605 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
12606 | check(numberOfExistingReferences < 1); | ||
12607 | } or { | ||
12608 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
12609 | } | ||
12610 | /** | ||
12611 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
12612 | */ | ||
12613 | private pattern mustInRelationsource_reference_Transition( | ||
12614 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12615 | source: DefinedElement, target:DefinedElement) | ||
12616 | { | ||
12617 | find interpretation(problem,interpretation); | ||
12618 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12619 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
12620 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12621 | BinaryElementRelationLink.param1(link,source); | ||
12622 | BinaryElementRelationLink.param2(link,target); | ||
12623 | } | ||
12624 | /** | ||
12625 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
12626 | */ | ||
12627 | private pattern mayInRelationsource_reference_Transition( | ||
12628 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12629 | source: DefinedElement, target:DefinedElement) | ||
12630 | { | ||
12631 | find interpretation(problem,interpretation); | ||
12632 | // The two endpoint of the link have to exist | ||
12633 | find mayExist(problem, interpretation, source); | ||
12634 | find mayExist(problem, interpretation, target); | ||
12635 | // Type consistency | ||
12636 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
12637 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
12638 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
12639 | // the upper bound of the multiplicity should be considered. | ||
12640 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
12641 | check(numberOfExistingReferences < 1); | ||
12642 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
12643 | // 1. Multiple parents | ||
12644 | neg find mustContains4(problem,interpretation,source,_); | ||
12645 | // 2. Circle in the containment hierarchy | ||
12646 | neg find mustTransitiveContains(source,target); | ||
12647 | } or { | ||
12648 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
12649 | } | ||
12650 | /** | ||
12651 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
12652 | */ | ||
12653 | private pattern mustInRelationregions_reference_CompositeElement( | ||
12654 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12655 | source: DefinedElement, target:DefinedElement) | ||
12656 | { | ||
12657 | find interpretation(problem,interpretation); | ||
12658 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12659 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
12660 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12661 | BinaryElementRelationLink.param1(link,source); | ||
12662 | BinaryElementRelationLink.param2(link,target); | ||
12663 | } | ||
12664 | /** | ||
12665 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
12666 | */ | ||
12667 | private pattern mayInRelationregions_reference_CompositeElement( | ||
12668 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12669 | source: DefinedElement, target:DefinedElement) | ||
12670 | { | ||
12671 | find interpretation(problem,interpretation); | ||
12672 | // The two endpoint of the link have to exist | ||
12673 | find mayExist(problem, interpretation, source); | ||
12674 | find mayExist(problem, interpretation, target); | ||
12675 | // Type consistency | ||
12676 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
12677 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
12678 | // The reference is containment, then a new reference cannot be create if: | ||
12679 | // 1. Multiple parents | ||
12680 | neg find mustContains4(problem,interpretation,_,target); | ||
12681 | // 2. Circle in the containment hierarchy | ||
12682 | neg find mustTransitiveContains(source,target); | ||
12683 | } or { | ||
12684 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
12685 | } | ||
12686 | |||
12687 | ////////// | ||
12688 | // 1.3 Relation Definition Indexers | ||
12689 | ////////// | ||
12690 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
12691 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
12692 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12693 | var_r1, var_e1) | ||
12694 | { | ||
12695 | find interpretation(problem,interpretation); | ||
12696 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12697 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
12698 | // r1 is exported | ||
12699 | // e1 is exported | ||
12700 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12701 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
12702 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12703 | var_virtual0 == var_e1; | ||
12704 | } | ||
12705 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
12706 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12707 | var_r1, var_e1) | ||
12708 | { | ||
12709 | find interpretation(problem,interpretation); | ||
12710 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12711 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
12712 | // r1 is exported | ||
12713 | // e1 is exported | ||
12714 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12715 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
12716 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12717 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
12718 | } | ||
12719 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
12720 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12721 | var_r1, var_e1) | ||
12722 | { | ||
12723 | find interpretation(problem,interpretation); | ||
12724 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12725 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
12726 | // r1 is exported | ||
12727 | // e1 is exported | ||
12728 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12729 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
12730 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12731 | var_virtual0 == var_e1; | ||
12732 | } | ||
12733 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
12734 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
12735 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12736 | var_r1) | ||
12737 | { | ||
12738 | find interpretation(problem,interpretation); | ||
12739 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12740 | // r1 is exported | ||
12741 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
12742 | } | ||
12743 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
12744 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12745 | var_r1) | ||
12746 | { | ||
12747 | find interpretation(problem,interpretation); | ||
12748 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12749 | // r1 is exported | ||
12750 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
12751 | } | ||
12752 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
12753 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12754 | var_r1) | ||
12755 | { | ||
12756 | find interpretation(problem,interpretation); | ||
12757 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12758 | // r1 is exported | ||
12759 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
12760 | } | ||
12761 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
12762 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
12763 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12764 | var_r) | ||
12765 | { | ||
12766 | find interpretation(problem,interpretation); | ||
12767 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
12768 | // r is exported | ||
12769 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
12770 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
12771 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
12772 | } | ||
12773 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
12774 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12775 | var_r) | ||
12776 | { | ||
12777 | find interpretation(problem,interpretation); | ||
12778 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
12779 | // r is exported | ||
12780 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
12781 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
12782 | var_e1 != var_e2; | ||
12783 | } | ||
12784 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
12785 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12786 | var_r) | ||
12787 | { | ||
12788 | find interpretation(problem,interpretation); | ||
12789 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
12790 | // r is exported | ||
12791 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
12792 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
12793 | var_e1 != var_e2; | ||
12794 | } | ||
12795 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
12796 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
12797 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12798 | var_t, var_src, var_trg) | ||
12799 | { | ||
12800 | find interpretation(problem,interpretation); | ||
12801 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12802 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
12803 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
12804 | // t is exported | ||
12805 | // src is exported | ||
12806 | // trg is exported | ||
12807 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12808 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
12809 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12810 | var_virtual0 == var_src; | ||
12811 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12812 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
12813 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
12814 | var_virtual1 == var_trg; | ||
12815 | } | ||
12816 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
12817 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12818 | var_t, var_src, var_trg) | ||
12819 | { | ||
12820 | find interpretation(problem,interpretation); | ||
12821 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
12822 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
12823 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
12824 | // t is exported | ||
12825 | // src is exported | ||
12826 | // trg is exported | ||
12827 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
12828 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
12829 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12830 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
12831 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
12832 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
12833 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
12834 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
12835 | } | ||
12836 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
12837 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12838 | var_t, var_src, var_trg) | ||
12839 | { | ||
12840 | find interpretation(problem,interpretation); | ||
12841 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12842 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
12843 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
12844 | // t is exported | ||
12845 | // src is exported | ||
12846 | // trg is exported | ||
12847 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12848 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
12849 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12850 | var_virtual0 == var_src; | ||
12851 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12852 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
12853 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
12854 | var_virtual1 == var_trg; | ||
12855 | } | ||
12856 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
12857 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
12858 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12859 | var_t, var_e) | ||
12860 | { | ||
12861 | find interpretation(problem,interpretation); | ||
12862 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12863 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12864 | // t is exported | ||
12865 | // e is exported | ||
12866 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
12867 | } | ||
12868 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
12869 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12870 | var_t, var_e) | ||
12871 | { | ||
12872 | find interpretation(problem,interpretation); | ||
12873 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
12874 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
12875 | // t is exported | ||
12876 | // e is exported | ||
12877 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
12878 | } | ||
12879 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
12880 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12881 | var_t, var_e) | ||
12882 | { | ||
12883 | find interpretation(problem,interpretation); | ||
12884 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12885 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12886 | // t is exported | ||
12887 | // e is exported | ||
12888 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
12889 | } | ||
12890 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
12891 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
12892 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12893 | var_e) | ||
12894 | { | ||
12895 | find interpretation(problem,interpretation); | ||
12896 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12897 | // e is exported | ||
12898 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
12899 | } | ||
12900 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
12901 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12902 | var_e) | ||
12903 | { | ||
12904 | find interpretation(problem,interpretation); | ||
12905 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
12906 | // e is exported | ||
12907 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
12908 | } | ||
12909 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
12910 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12911 | var_e) | ||
12912 | { | ||
12913 | find interpretation(problem,interpretation); | ||
12914 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12915 | // e is exported | ||
12916 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
12917 | } | ||
12918 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
12919 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
12920 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12921 | var_e, var_t1, var_t2) | ||
12922 | { | ||
12923 | find interpretation(problem,interpretation); | ||
12924 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12925 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
12926 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
12927 | // e is exported | ||
12928 | // t1 is exported | ||
12929 | // t2 is exported | ||
12930 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12931 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
12932 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
12933 | var_virtual0 == var_t1; | ||
12934 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12935 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
12936 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
12937 | var_virtual1 == var_t2; | ||
12938 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
12939 | } | ||
12940 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
12941 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12942 | var_e, var_t1, var_t2) | ||
12943 | { | ||
12944 | find interpretation(problem,interpretation); | ||
12945 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
12946 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
12947 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
12948 | // e is exported | ||
12949 | // t1 is exported | ||
12950 | // t2 is exported | ||
12951 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
12952 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
12953 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
12954 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
12955 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
12956 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
12957 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
12958 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
12959 | var_t1 != var_t2; | ||
12960 | } | ||
12961 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
12962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12963 | var_e, var_t1, var_t2) | ||
12964 | { | ||
12965 | find interpretation(problem,interpretation); | ||
12966 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12967 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
12968 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
12969 | // e is exported | ||
12970 | // t1 is exported | ||
12971 | // t2 is exported | ||
12972 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12973 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
12974 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
12975 | var_virtual0 == var_t1; | ||
12976 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
12977 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
12978 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
12979 | var_virtual1 == var_t2; | ||
12980 | var_t1 != var_t2; | ||
12981 | } | ||
12982 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
12983 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
12984 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12985 | var_t, var_e) | ||
12986 | { | ||
12987 | find interpretation(problem,interpretation); | ||
12988 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
12989 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
12990 | // t is exported | ||
12991 | // e is exported | ||
12992 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
12993 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
12994 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
12995 | var_virtual0 == var_t; | ||
12996 | } | ||
12997 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
12998 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12999 | var_t, var_e) | ||
13000 | { | ||
13001 | find interpretation(problem,interpretation); | ||
13002 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13003 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
13004 | // t is exported | ||
13005 | // e is exported | ||
13006 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
13007 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13008 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13009 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
13010 | } | ||
13011 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
13012 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13013 | var_t, var_e) | ||
13014 | { | ||
13015 | find interpretation(problem,interpretation); | ||
13016 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13017 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
13018 | // t is exported | ||
13019 | // e is exported | ||
13020 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
13021 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13022 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13023 | var_virtual0 == var_t; | ||
13024 | } | ||
13025 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
13026 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
13027 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13028 | var_t, var_f) | ||
13029 | { | ||
13030 | find interpretation(problem,interpretation); | ||
13031 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13032 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13033 | // t is exported | ||
13034 | // f is exported | ||
13035 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13036 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
13037 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13038 | var_virtual0 == var_t; | ||
13039 | } | ||
13040 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
13041 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13042 | var_t, var_f) | ||
13043 | { | ||
13044 | find interpretation(problem,interpretation); | ||
13045 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13046 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13047 | // t is exported | ||
13048 | // f is exported | ||
13049 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13050 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
13051 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13052 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
13053 | } | ||
13054 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
13055 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13056 | var_t, var_f) | ||
13057 | { | ||
13058 | find interpretation(problem,interpretation); | ||
13059 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13060 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13061 | // t is exported | ||
13062 | // f is exported | ||
13063 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13064 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
13065 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13066 | var_virtual0 == var_t; | ||
13067 | } | ||
13068 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
13069 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
13070 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13071 | var_region) | ||
13072 | { | ||
13073 | find interpretation(problem,interpretation); | ||
13074 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13075 | // region is exported | ||
13076 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
13077 | } | ||
13078 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
13079 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13080 | var_region) | ||
13081 | { | ||
13082 | find interpretation(problem,interpretation); | ||
13083 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
13084 | // region is exported | ||
13085 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
13086 | } | ||
13087 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
13088 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13089 | var_region) | ||
13090 | { | ||
13091 | find interpretation(problem,interpretation); | ||
13092 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13093 | // region is exported | ||
13094 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
13095 | } | ||
13096 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
13097 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
13098 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13099 | var_region, var_state) | ||
13100 | { | ||
13101 | find interpretation(problem,interpretation); | ||
13102 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13103 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
13104 | // region is exported | ||
13105 | // state is exported | ||
13106 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13107 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
13108 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13109 | var_virtual0 == var_state; | ||
13110 | } | ||
13111 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
13112 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13113 | var_region, var_state) | ||
13114 | { | ||
13115 | find interpretation(problem,interpretation); | ||
13116 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
13117 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
13118 | // region is exported | ||
13119 | // state is exported | ||
13120 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
13121 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
13122 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13123 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
13124 | } | ||
13125 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
13126 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13127 | var_region, var_state) | ||
13128 | { | ||
13129 | find interpretation(problem,interpretation); | ||
13130 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13131 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
13132 | // region is exported | ||
13133 | // state is exported | ||
13134 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13135 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
13136 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13137 | var_virtual0 == var_state; | ||
13138 | } | ||
13139 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
13140 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
13141 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13142 | var_c) | ||
13143 | { | ||
13144 | find interpretation(problem,interpretation); | ||
13145 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13146 | // c is exported | ||
13147 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
13148 | } | ||
13149 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
13150 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13151 | var_c) | ||
13152 | { | ||
13153 | find interpretation(problem,interpretation); | ||
13154 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
13155 | // c is exported | ||
13156 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
13157 | } | ||
13158 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
13159 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13160 | var_c) | ||
13161 | { | ||
13162 | find interpretation(problem,interpretation); | ||
13163 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13164 | // c is exported | ||
13165 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
13166 | } | ||
13167 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
13168 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
13169 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13170 | var_c) | ||
13171 | { | ||
13172 | find interpretation(problem,interpretation); | ||
13173 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13174 | // c is exported | ||
13175 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
13176 | } | ||
13177 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
13178 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13179 | var_c) | ||
13180 | { | ||
13181 | find interpretation(problem,interpretation); | ||
13182 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
13183 | // c is exported | ||
13184 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
13185 | } | ||
13186 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
13187 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13188 | var_c) | ||
13189 | { | ||
13190 | find interpretation(problem,interpretation); | ||
13191 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13192 | // c is exported | ||
13193 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
13194 | } | ||
13195 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
13196 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
13197 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13198 | var_s) | ||
13199 | { | ||
13200 | find interpretation(problem,interpretation); | ||
13201 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13202 | // s is exported | ||
13203 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
13204 | } | ||
13205 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
13206 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13207 | var_s) | ||
13208 | { | ||
13209 | find interpretation(problem,interpretation); | ||
13210 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13211 | // s is exported | ||
13212 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
13213 | } | ||
13214 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
13215 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13216 | var_s) | ||
13217 | { | ||
13218 | find interpretation(problem,interpretation); | ||
13219 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13220 | // s is exported | ||
13221 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
13222 | } | ||
13223 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
13224 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
13225 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13226 | var_s) | ||
13227 | { | ||
13228 | find interpretation(problem,interpretation); | ||
13229 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13230 | // s is exported | ||
13231 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
13232 | } | ||
13233 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
13234 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13235 | var_s) | ||
13236 | { | ||
13237 | find interpretation(problem,interpretation); | ||
13238 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13239 | // s is exported | ||
13240 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
13241 | } | ||
13242 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
13243 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13244 | var_s) | ||
13245 | { | ||
13246 | find interpretation(problem,interpretation); | ||
13247 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13248 | // s is exported | ||
13249 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
13250 | } | ||
13251 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
13252 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
13253 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13254 | var_s, var_v1, var_v2) | ||
13255 | { | ||
13256 | find interpretation(problem,interpretation); | ||
13257 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13258 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13259 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13260 | // s is exported | ||
13261 | // v1 is exported | ||
13262 | // v2 is exported | ||
13263 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
13264 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
13265 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
13266 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13267 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13268 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13269 | var_virtual0 == var_v1; | ||
13270 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13271 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13272 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13273 | var_virtual1 == var_v2; | ||
13274 | }or{ | ||
13275 | find interpretation(problem,interpretation); | ||
13276 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13277 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13278 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13279 | // s is exported | ||
13280 | // v1 is exported | ||
13281 | // v2 is exported | ||
13282 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
13283 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
13284 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
13285 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13286 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13287 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13288 | var_virtual0 == var_v1; | ||
13289 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13290 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13291 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13292 | var_virtual1 == var_v2; | ||
13293 | } | ||
13294 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
13295 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13296 | var_s, var_v1, var_v2) | ||
13297 | { | ||
13298 | find interpretation(problem,interpretation); | ||
13299 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13300 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13301 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13302 | // s is exported | ||
13303 | // v1 is exported | ||
13304 | // v2 is exported | ||
13305 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
13306 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
13307 | var_t1 != var_t2; | ||
13308 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13309 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13310 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13311 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
13312 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13313 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13314 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13315 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
13316 | }or{ | ||
13317 | find interpretation(problem,interpretation); | ||
13318 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13319 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13320 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13321 | // s is exported | ||
13322 | // v1 is exported | ||
13323 | // v2 is exported | ||
13324 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
13325 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
13326 | var_t1 != var_t2; | ||
13327 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13328 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13329 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13330 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
13331 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13332 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13333 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13334 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
13335 | } | ||
13336 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
13337 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13338 | var_s, var_v1, var_v2) | ||
13339 | { | ||
13340 | find interpretation(problem,interpretation); | ||
13341 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13342 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13343 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13344 | // s is exported | ||
13345 | // v1 is exported | ||
13346 | // v2 is exported | ||
13347 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
13348 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
13349 | var_t1 != var_t2; | ||
13350 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13351 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13352 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13353 | var_virtual0 == var_v1; | ||
13354 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13355 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13356 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13357 | var_virtual1 == var_v2; | ||
13358 | }or{ | ||
13359 | find interpretation(problem,interpretation); | ||
13360 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13361 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13362 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13363 | // s is exported | ||
13364 | // v1 is exported | ||
13365 | // v2 is exported | ||
13366 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
13367 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
13368 | var_t1 != var_t2; | ||
13369 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13370 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13371 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13372 | var_virtual0 == var_v1; | ||
13373 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13374 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13375 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13376 | var_virtual1 == var_v2; | ||
13377 | } | ||
13378 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
13379 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
13380 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13381 | var_s) | ||
13382 | { | ||
13383 | find interpretation(problem,interpretation); | ||
13384 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13385 | // s is exported | ||
13386 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
13387 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
13388 | } | ||
13389 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
13390 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13391 | var_s) | ||
13392 | { | ||
13393 | find interpretation(problem,interpretation); | ||
13394 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13395 | // s is exported | ||
13396 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
13397 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
13398 | } | ||
13399 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
13400 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13401 | var_s) | ||
13402 | { | ||
13403 | find interpretation(problem,interpretation); | ||
13404 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13405 | // s is exported | ||
13406 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
13407 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
13408 | } | ||
13409 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
13410 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
13411 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13412 | var_v) | ||
13413 | { | ||
13414 | find interpretation(problem,interpretation); | ||
13415 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13416 | // v is exported | ||
13417 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
13418 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
13419 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
13420 | } | ||
13421 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
13422 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13423 | var_v) | ||
13424 | { | ||
13425 | find interpretation(problem,interpretation); | ||
13426 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13427 | // v is exported | ||
13428 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
13429 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
13430 | var_trg1 != var_trg2; | ||
13431 | } | ||
13432 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
13433 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13434 | var_v) | ||
13435 | { | ||
13436 | find interpretation(problem,interpretation); | ||
13437 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13438 | // v is exported | ||
13439 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
13440 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
13441 | var_trg1 != var_trg2; | ||
13442 | } | ||
13443 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
13444 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
13445 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13446 | var_v) | ||
13447 | { | ||
13448 | find interpretation(problem,interpretation); | ||
13449 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13450 | // v is exported | ||
13451 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
13452 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
13453 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
13454 | } | ||
13455 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
13456 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13457 | var_v) | ||
13458 | { | ||
13459 | find interpretation(problem,interpretation); | ||
13460 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13461 | // v is exported | ||
13462 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
13463 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
13464 | var_src1 != var_src2; | ||
13465 | } | ||
13466 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
13467 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13468 | var_v) | ||
13469 | { | ||
13470 | find interpretation(problem,interpretation); | ||
13471 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13472 | // v is exported | ||
13473 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
13474 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
13475 | var_src1 != var_src2; | ||
13476 | } | ||
13477 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
13478 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
13479 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13480 | var_s, var_v1, var_v2) | ||
13481 | { | ||
13482 | find interpretation(problem,interpretation); | ||
13483 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13484 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13485 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13486 | // s is exported | ||
13487 | // v1 is exported | ||
13488 | // v2 is exported | ||
13489 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
13490 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
13491 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13492 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13493 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13494 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13495 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13496 | var_virtual1 == var_v1; | ||
13497 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13498 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13499 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13500 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13501 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13502 | var_virtual3 == var_v2; | ||
13503 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
13504 | }or{ | ||
13505 | find interpretation(problem,interpretation); | ||
13506 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13507 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13508 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13509 | // s is exported | ||
13510 | // v1 is exported | ||
13511 | // v2 is exported | ||
13512 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
13513 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
13514 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13515 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13516 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13517 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13518 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13519 | var_virtual1 == var_v1; | ||
13520 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13521 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13522 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13523 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13524 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13525 | var_virtual3 == var_v2; | ||
13526 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
13527 | } | ||
13528 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
13529 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13530 | var_s, var_v1, var_v2) | ||
13531 | { | ||
13532 | find interpretation(problem,interpretation); | ||
13533 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13534 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13535 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13536 | // s is exported | ||
13537 | // v1 is exported | ||
13538 | // v2 is exported | ||
13539 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
13540 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
13541 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13542 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13543 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13544 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13545 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13546 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
13547 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13548 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13549 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13550 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13551 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13552 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
13553 | var_r1 != var_r2; | ||
13554 | }or{ | ||
13555 | find interpretation(problem,interpretation); | ||
13556 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13557 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13558 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13559 | // s is exported | ||
13560 | // v1 is exported | ||
13561 | // v2 is exported | ||
13562 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
13563 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
13564 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13565 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13566 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13567 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13568 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13569 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
13570 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13571 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13572 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13573 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13574 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13575 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
13576 | var_r1 != var_r2; | ||
13577 | } | ||
13578 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
13579 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13580 | var_s, var_v1, var_v2) | ||
13581 | { | ||
13582 | find interpretation(problem,interpretation); | ||
13583 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13584 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13585 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13586 | // s is exported | ||
13587 | // v1 is exported | ||
13588 | // v2 is exported | ||
13589 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
13590 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
13591 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13592 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13593 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13594 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13595 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13596 | var_virtual1 == var_v1; | ||
13597 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13598 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13599 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13600 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13601 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13602 | var_virtual3 == var_v2; | ||
13603 | var_r1 != var_r2; | ||
13604 | }or{ | ||
13605 | find interpretation(problem,interpretation); | ||
13606 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13607 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13608 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13609 | // s is exported | ||
13610 | // v1 is exported | ||
13611 | // v2 is exported | ||
13612 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
13613 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
13614 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13615 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13616 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13617 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13618 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13619 | var_virtual1 == var_v1; | ||
13620 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13621 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13622 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13623 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13624 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13625 | var_virtual3 == var_v2; | ||
13626 | var_r1 != var_r2; | ||
13627 | } | ||
13628 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
13629 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
13630 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13631 | var_parent, var_child) | ||
13632 | { | ||
13633 | find interpretation(problem,interpretation); | ||
13634 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13635 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
13636 | // parent is exported | ||
13637 | // child is exported | ||
13638 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13639 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
13640 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13641 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13642 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13643 | var_virtual1 == var_child; | ||
13644 | } | ||
13645 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
13646 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13647 | var_parent, var_child) | ||
13648 | { | ||
13649 | find interpretation(problem,interpretation); | ||
13650 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13651 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
13652 | // parent is exported | ||
13653 | // child is exported | ||
13654 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13655 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
13656 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13657 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13658 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13659 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
13660 | } | ||
13661 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
13662 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13663 | var_parent, var_child) | ||
13664 | { | ||
13665 | find interpretation(problem,interpretation); | ||
13666 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13667 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
13668 | // parent is exported | ||
13669 | // child is exported | ||
13670 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13671 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
13672 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13673 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13674 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13675 | var_virtual1 == var_child; | ||
13676 | } | ||
13677 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
13678 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
13679 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13680 | var_s, var_v) | ||
13681 | { | ||
13682 | find interpretation(problem,interpretation); | ||
13683 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13684 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
13685 | // s is exported | ||
13686 | // v is exported | ||
13687 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
13688 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13689 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13690 | }or{ | ||
13691 | find interpretation(problem,interpretation); | ||
13692 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13693 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
13694 | // s is exported | ||
13695 | // v is exported | ||
13696 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
13697 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13698 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13699 | } | ||
13700 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
13701 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13702 | var_s, var_v) | ||
13703 | { | ||
13704 | find interpretation(problem,interpretation); | ||
13705 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13706 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
13707 | // s is exported | ||
13708 | // v is exported | ||
13709 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
13710 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13711 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13712 | }or{ | ||
13713 | find interpretation(problem,interpretation); | ||
13714 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13715 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
13716 | // s is exported | ||
13717 | // v is exported | ||
13718 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
13719 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13720 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13721 | } | ||
13722 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
13723 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13724 | var_s, var_v) | ||
13725 | { | ||
13726 | find interpretation(problem,interpretation); | ||
13727 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13728 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
13729 | // s is exported | ||
13730 | // v is exported | ||
13731 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
13732 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13733 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13734 | }or{ | ||
13735 | find interpretation(problem,interpretation); | ||
13736 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13737 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
13738 | // s is exported | ||
13739 | // v is exported | ||
13740 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
13741 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13742 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13743 | } | ||
13744 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
13745 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
13746 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13747 | var_composite) | ||
13748 | { | ||
13749 | find interpretation(problem,interpretation); | ||
13750 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13751 | // composite is exported | ||
13752 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13753 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
13754 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13755 | var_virtual0 == var_region1; | ||
13756 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13757 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
13758 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
13759 | var_virtual1 == var_region2; | ||
13760 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
13761 | } | ||
13762 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
13763 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13764 | var_composite) | ||
13765 | { | ||
13766 | find interpretation(problem,interpretation); | ||
13767 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13768 | // composite is exported | ||
13769 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13770 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
13771 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13772 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
13773 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13774 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
13775 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
13776 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
13777 | var_region1 != var_region2; | ||
13778 | } | ||
13779 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
13780 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13781 | var_composite) | ||
13782 | { | ||
13783 | find interpretation(problem,interpretation); | ||
13784 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13785 | // composite is exported | ||
13786 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13787 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
13788 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13789 | var_virtual0 == var_region1; | ||
13790 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
13791 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
13792 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
13793 | var_virtual1 == var_region2; | ||
13794 | var_region1 != var_region2; | ||
13795 | } | ||
13796 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
13797 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
13798 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13799 | var_s) | ||
13800 | { | ||
13801 | find interpretation(problem,interpretation); | ||
13802 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13803 | // s is exported | ||
13804 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13805 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
13806 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13807 | var_virtual0 == var_s; | ||
13808 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13809 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
13810 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13811 | var_virtual1 == var_s; | ||
13812 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
13813 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
13814 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
13815 | var_virtual2 == var_s; | ||
13816 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
13817 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
13818 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
13819 | }or{ | ||
13820 | find interpretation(problem,interpretation); | ||
13821 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13822 | // s is exported | ||
13823 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13824 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
13825 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13826 | var_virtual0 == var_s; | ||
13827 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13828 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
13829 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13830 | var_virtual1 == var_s; | ||
13831 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
13832 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
13833 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
13834 | var_virtual2 == var_s; | ||
13835 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
13836 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
13837 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
13838 | } | ||
13839 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
13840 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13841 | var_s) | ||
13842 | { | ||
13843 | find interpretation(problem,interpretation); | ||
13844 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13845 | // s is exported | ||
13846 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13847 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
13848 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13849 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
13850 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13851 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
13852 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13853 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
13854 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
13855 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
13856 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
13857 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
13858 | var_t1 != var_t2; | ||
13859 | var_t2 != var_t3; | ||
13860 | var_t1 != var_t3; | ||
13861 | }or{ | ||
13862 | find interpretation(problem,interpretation); | ||
13863 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13864 | // s is exported | ||
13865 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13866 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
13867 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13868 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
13869 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13870 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
13871 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13872 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
13873 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
13874 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
13875 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
13876 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
13877 | var_t1 != var_t2; | ||
13878 | var_t2 != var_t3; | ||
13879 | var_t1 != var_t3; | ||
13880 | } | ||
13881 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
13882 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13883 | var_s) | ||
13884 | { | ||
13885 | find interpretation(problem,interpretation); | ||
13886 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13887 | // s is exported | ||
13888 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13889 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
13890 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13891 | var_virtual0 == var_s; | ||
13892 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13893 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
13894 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13895 | var_virtual1 == var_s; | ||
13896 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
13897 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
13898 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
13899 | var_virtual2 == var_s; | ||
13900 | var_t1 != var_t2; | ||
13901 | var_t2 != var_t3; | ||
13902 | var_t1 != var_t3; | ||
13903 | }or{ | ||
13904 | find interpretation(problem,interpretation); | ||
13905 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13906 | // s is exported | ||
13907 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13908 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
13909 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13910 | var_virtual0 == var_s; | ||
13911 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13912 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
13913 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13914 | var_virtual1 == var_s; | ||
13915 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
13916 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
13917 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
13918 | var_virtual2 == var_s; | ||
13919 | var_t1 != var_t2; | ||
13920 | var_t2 != var_t3; | ||
13921 | var_t1 != var_t3; | ||
13922 | } | ||
13923 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
13924 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
13925 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13926 | var_s1, var_s2) | ||
13927 | { | ||
13928 | find interpretation(problem,interpretation); | ||
13929 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
13930 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
13931 | // s1 is exported | ||
13932 | // s2 is exported | ||
13933 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
13934 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
13935 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
13936 | } | ||
13937 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
13938 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13939 | var_s1, var_s2) | ||
13940 | { | ||
13941 | find interpretation(problem,interpretation); | ||
13942 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
13943 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
13944 | // s1 is exported | ||
13945 | // s2 is exported | ||
13946 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
13947 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
13948 | var_s1 != var_s2; | ||
13949 | } | ||
13950 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
13951 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13952 | var_s1, var_s2) | ||
13953 | { | ||
13954 | find interpretation(problem,interpretation); | ||
13955 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
13956 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
13957 | // s1 is exported | ||
13958 | // s2 is exported | ||
13959 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
13960 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
13961 | var_s1 != var_s2; | ||
13962 | } | ||
13963 | |||
13964 | ////////// | ||
13965 | // 1.4 Containment Indexer | ||
13966 | ////////// | ||
13967 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
13968 | find mustContains4(_,_,source,target); | ||
13969 | } | ||
13970 | |||
13971 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
13972 | source: DefinedElement, target: DefinedElement) | ||
13973 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
13974 | |||
13975 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
13976 | |||
13977 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
13978 | |||
13979 | private pattern mustTransitiveContains(source,target) { | ||
13980 | find mustContains2+(source,target); | ||
13981 | } | ||
13982 | |||
13983 | ////////// | ||
13984 | // 2. Invalidation Indexers | ||
13985 | ////////// | ||
13986 | // 2.1 Invalidated by WF Queries | ||
13987 | ////////// | ||
13988 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
13989 | var_r1) | ||
13990 | { | ||
13991 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
13992 | } | ||
13993 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
13994 | var_r) | ||
13995 | { | ||
13996 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
13997 | } | ||
13998 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
13999 | var_t, var_e) | ||
14000 | { | ||
14001 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
14002 | } | ||
14003 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14004 | var_e) | ||
14005 | { | ||
14006 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
14007 | } | ||
14008 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14009 | var_e, var_t1, var_t2) | ||
14010 | { | ||
14011 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
14012 | } | ||
14013 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14014 | var_t, var_e) | ||
14015 | { | ||
14016 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
14017 | } | ||
14018 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14019 | var_t, var_f) | ||
14020 | { | ||
14021 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
14022 | } | ||
14023 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14024 | var_region) | ||
14025 | { | ||
14026 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
14027 | } | ||
14028 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14029 | var_c) | ||
14030 | { | ||
14031 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
14032 | } | ||
14033 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14034 | var_c) | ||
14035 | { | ||
14036 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
14037 | } | ||
14038 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14039 | var_s) | ||
14040 | { | ||
14041 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
14042 | } | ||
14043 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14044 | var_s) | ||
14045 | { | ||
14046 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
14047 | } | ||
14048 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14049 | var_s, var_v1, var_v2) | ||
14050 | { | ||
14051 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
14052 | } | ||
14053 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14054 | var_s) | ||
14055 | { | ||
14056 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
14057 | } | ||
14058 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14059 | var_s, var_v1, var_v2) | ||
14060 | { | ||
14061 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
14062 | } | ||
14063 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14064 | var_s, var_v) | ||
14065 | { | ||
14066 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
14067 | } | ||
14068 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14069 | var_s) | ||
14070 | { | ||
14071 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
14072 | } | ||
14073 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14074 | var_s1, var_s2) | ||
14075 | { | ||
14076 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
14077 | } | ||
14078 | |||
14079 | ////////// | ||
14080 | // 3. Unfinishedness Indexers | ||
14081 | ////////// | ||
14082 | // 3.1 Unfinishedness Measured by Multiplicity | ||
14083 | ////////// | ||
14084 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
14085 | find interpretation(problem,interpretation); | ||
14086 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14087 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
14088 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
14089 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
14090 | check(numberOfExistingReferences < 1); | ||
14091 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
14092 | } | ||
14093 | |||
14094 | ////////// | ||
14095 | // 3.2 Unfinishedness Measured by WF Queries | ||
14096 | ////////// | ||
14097 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14098 | var_r1) | ||
14099 | { | ||
14100 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
14101 | } | ||
14102 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14103 | var_r) | ||
14104 | { | ||
14105 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
14106 | } | ||
14107 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14108 | var_t, var_e) | ||
14109 | { | ||
14110 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
14111 | } | ||
14112 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14113 | var_e) | ||
14114 | { | ||
14115 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
14116 | } | ||
14117 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14118 | var_e, var_t1, var_t2) | ||
14119 | { | ||
14120 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
14121 | } | ||
14122 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14123 | var_t, var_e) | ||
14124 | { | ||
14125 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
14126 | } | ||
14127 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14128 | var_t, var_f) | ||
14129 | { | ||
14130 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
14131 | } | ||
14132 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14133 | var_region) | ||
14134 | { | ||
14135 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
14136 | } | ||
14137 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14138 | var_c) | ||
14139 | { | ||
14140 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
14141 | } | ||
14142 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14143 | var_c) | ||
14144 | { | ||
14145 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
14146 | } | ||
14147 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14148 | var_s) | ||
14149 | { | ||
14150 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
14151 | } | ||
14152 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14153 | var_s) | ||
14154 | { | ||
14155 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
14156 | } | ||
14157 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14158 | var_s, var_v1, var_v2) | ||
14159 | { | ||
14160 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
14161 | } | ||
14162 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14163 | var_s) | ||
14164 | { | ||
14165 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
14166 | } | ||
14167 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14168 | var_s, var_v1, var_v2) | ||
14169 | { | ||
14170 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
14171 | } | ||
14172 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14173 | var_s, var_v) | ||
14174 | { | ||
14175 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
14176 | } | ||
14177 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14178 | var_s) | ||
14179 | { | ||
14180 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
14181 | } | ||
14182 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14183 | var_s1, var_s2) | ||
14184 | { | ||
14185 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
14186 | } | ||
14187 | |||
14188 | ////////// | ||
14189 | // 4. Refinement Indexers | ||
14190 | ////////// | ||
14191 | // 4.1 Object constructors | ||
14192 | ////////// | ||
14193 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
14194 | { | ||
14195 | find interpretation(problem,interpretation); | ||
14196 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
14197 | find mustExist(problem, interpretation, root); | ||
14198 | }or{ | ||
14199 | find interpretation(problem,interpretation); | ||
14200 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
14201 | find mustExist(problem, interpretation, root); | ||
14202 | }or{ | ||
14203 | find interpretation(problem,interpretation); | ||
14204 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
14205 | find mustExist(problem, interpretation, root); | ||
14206 | }or{ | ||
14207 | find interpretation(problem,interpretation); | ||
14208 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
14209 | find mustExist(problem, interpretation, root); | ||
14210 | }or{ | ||
14211 | find interpretation(problem,interpretation); | ||
14212 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
14213 | find mustExist(problem, interpretation, root); | ||
14214 | }or{ | ||
14215 | find interpretation(problem,interpretation); | ||
14216 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
14217 | find mustExist(problem, interpretation, root); | ||
14218 | }or{ | ||
14219 | find interpretation(problem,interpretation); | ||
14220 | find mustInstanceOfState_class(problem,interpretation,root); | ||
14221 | find mustExist(problem, interpretation, root); | ||
14222 | }or{ | ||
14223 | find interpretation(problem,interpretation); | ||
14224 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
14225 | find mustExist(problem, interpretation, root); | ||
14226 | }or{ | ||
14227 | find interpretation(problem,interpretation); | ||
14228 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
14229 | find mustExist(problem, interpretation, root); | ||
14230 | }or{ | ||
14231 | find interpretation(problem,interpretation); | ||
14232 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
14233 | find mustExist(problem, interpretation, root); | ||
14234 | }or{ | ||
14235 | find interpretation(problem,interpretation); | ||
14236 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
14237 | find mustExist(problem, interpretation, root); | ||
14238 | }or{ | ||
14239 | find interpretation(problem,interpretation); | ||
14240 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
14241 | find mustExist(problem, interpretation, root); | ||
14242 | }or{ | ||
14243 | find interpretation(problem,interpretation); | ||
14244 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
14245 | find mustExist(problem, interpretation, root); | ||
14246 | }or{ | ||
14247 | find interpretation(problem,interpretation); | ||
14248 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
14249 | find mustExist(problem, interpretation, root); | ||
14250 | }or{ | ||
14251 | find interpretation(problem,interpretation); | ||
14252 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
14253 | find mustExist(problem, interpretation, root); | ||
14254 | }or{ | ||
14255 | find interpretation(problem,interpretation); | ||
14256 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
14257 | find mustExist(problem, interpretation, root); | ||
14258 | }or{ | ||
14259 | find interpretation(problem,interpretation); | ||
14260 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
14261 | find mustExist(problem, interpretation, root); | ||
14262 | } | ||
14263 | pattern createObject_State_class_by_vertices_reference_Region( | ||
14264 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14265 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14266 | container:DefinedElement) | ||
14267 | { | ||
14268 | find interpretation(problem,interpretation); | ||
14269 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14270 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
14271 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14272 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14273 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14274 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
14275 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14276 | find mustExist(problem, interpretation, container); | ||
14277 | neg find mustExist(problem, interpretation, newObject); | ||
14278 | } | ||
14279 | pattern createObject_State_class( | ||
14280 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14281 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14282 | { | ||
14283 | find interpretation(problem,interpretation); | ||
14284 | neg find hasElementInContainment(problem,interpretation); | ||
14285 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14286 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
14287 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
14288 | find mayExist(problem, interpretation, newObject); | ||
14289 | neg find mustExist(problem, interpretation, newObject); | ||
14290 | } | ||
14291 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
14292 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14293 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14294 | container:DefinedElement) | ||
14295 | { | ||
14296 | find interpretation(problem,interpretation); | ||
14297 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14298 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
14299 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14300 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
14301 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
14302 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
14303 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
14304 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
14305 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
14306 | find mustExist(problem, interpretation, container); | ||
14307 | neg find mustExist(problem, interpretation, newObject); | ||
14308 | } | ||
14309 | pattern createObject_Transition_class( | ||
14310 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14311 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14312 | { | ||
14313 | find interpretation(problem,interpretation); | ||
14314 | neg find hasElementInContainment(problem,interpretation); | ||
14315 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14316 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
14317 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
14318 | find mayExist(problem, interpretation, newObject); | ||
14319 | neg find mustExist(problem, interpretation, newObject); | ||
14320 | } | ||
14321 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
14322 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14323 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14324 | container:DefinedElement) | ||
14325 | { | ||
14326 | find interpretation(problem,interpretation); | ||
14327 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14328 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
14329 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14330 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14331 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14332 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
14333 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14334 | find mustExist(problem, interpretation, container); | ||
14335 | neg find mustExist(problem, interpretation, newObject); | ||
14336 | } | ||
14337 | pattern createObject_Synchronization_class( | ||
14338 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14339 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14340 | { | ||
14341 | find interpretation(problem,interpretation); | ||
14342 | neg find hasElementInContainment(problem,interpretation); | ||
14343 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14344 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
14345 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
14346 | find mayExist(problem, interpretation, newObject); | ||
14347 | neg find mustExist(problem, interpretation, newObject); | ||
14348 | } | ||
14349 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
14350 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14351 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14352 | container:DefinedElement) | ||
14353 | { | ||
14354 | find interpretation(problem,interpretation); | ||
14355 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14356 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
14357 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14358 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14359 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14360 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
14361 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14362 | find mustExist(problem, interpretation, container); | ||
14363 | neg find mustExist(problem, interpretation, newObject); | ||
14364 | } | ||
14365 | pattern createObject_FinalState_class( | ||
14366 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14367 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14368 | { | ||
14369 | find interpretation(problem,interpretation); | ||
14370 | neg find hasElementInContainment(problem,interpretation); | ||
14371 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14372 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
14373 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
14374 | find mayExist(problem, interpretation, newObject); | ||
14375 | neg find mustExist(problem, interpretation, newObject); | ||
14376 | } | ||
14377 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
14378 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14379 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14380 | container:DefinedElement) | ||
14381 | { | ||
14382 | find interpretation(problem,interpretation); | ||
14383 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14384 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
14385 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14386 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14387 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14388 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
14389 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14390 | find mustExist(problem, interpretation, container); | ||
14391 | neg find mustExist(problem, interpretation, newObject); | ||
14392 | } | ||
14393 | pattern createObject_Choice_class( | ||
14394 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14395 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14396 | { | ||
14397 | find interpretation(problem,interpretation); | ||
14398 | neg find hasElementInContainment(problem,interpretation); | ||
14399 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14400 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
14401 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
14402 | find mayExist(problem, interpretation, newObject); | ||
14403 | neg find mustExist(problem, interpretation, newObject); | ||
14404 | } | ||
14405 | pattern createObject_Statechart_class_UndefinedPart( | ||
14406 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14407 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14408 | { | ||
14409 | find interpretation(problem,interpretation); | ||
14410 | neg find hasElementInContainment(problem,interpretation); | ||
14411 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14412 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
14413 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
14414 | find mayExist(problem, interpretation, newObject); | ||
14415 | neg find mustExist(problem, interpretation, newObject); | ||
14416 | } | ||
14417 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
14418 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14419 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14420 | container:DefinedElement) | ||
14421 | { | ||
14422 | find interpretation(problem,interpretation); | ||
14423 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14424 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
14425 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14426 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
14427 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
14428 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
14429 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
14430 | find mustExist(problem, interpretation, container); | ||
14431 | neg find mustExist(problem, interpretation, newObject); | ||
14432 | } | ||
14433 | pattern createObject_Region_class( | ||
14434 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14435 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14436 | { | ||
14437 | find interpretation(problem,interpretation); | ||
14438 | neg find hasElementInContainment(problem,interpretation); | ||
14439 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14440 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
14441 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
14442 | find mayExist(problem, interpretation, newObject); | ||
14443 | neg find mustExist(problem, interpretation, newObject); | ||
14444 | } | ||
14445 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
14446 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14447 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14448 | container:DefinedElement) | ||
14449 | { | ||
14450 | find interpretation(problem,interpretation); | ||
14451 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14452 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
14453 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14454 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14455 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14456 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
14457 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14458 | find mustExist(problem, interpretation, container); | ||
14459 | neg find mustExist(problem, interpretation, newObject); | ||
14460 | } | ||
14461 | pattern createObject_Entry_class( | ||
14462 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14463 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14464 | { | ||
14465 | find interpretation(problem,interpretation); | ||
14466 | neg find hasElementInContainment(problem,interpretation); | ||
14467 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14468 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
14469 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
14470 | find mayExist(problem, interpretation, newObject); | ||
14471 | neg find mustExist(problem, interpretation, newObject); | ||
14472 | } | ||
14473 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
14474 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14475 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14476 | container:DefinedElement) | ||
14477 | { | ||
14478 | find interpretation(problem,interpretation); | ||
14479 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14480 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
14481 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14482 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14483 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14484 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
14485 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14486 | find mustExist(problem, interpretation, container); | ||
14487 | neg find mustExist(problem, interpretation, newObject); | ||
14488 | } | ||
14489 | pattern createObject_Exit_class( | ||
14490 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14491 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14492 | { | ||
14493 | find interpretation(problem,interpretation); | ||
14494 | neg find hasElementInContainment(problem,interpretation); | ||
14495 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14496 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
14497 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
14498 | find mayExist(problem, interpretation, newObject); | ||
14499 | neg find mustExist(problem, interpretation, newObject); | ||
14500 | } | ||
14501 | |||
14502 | ////////// | ||
14503 | // 4.2 Type refinement | ||
14504 | ////////// | ||
14505 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14506 | find interpretation(problem,interpretation); | ||
14507 | PartialInterpretation.newElements(interpretation,element); | ||
14508 | find mayInstanceOfState_class(problem,interpretation,element); | ||
14509 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
14510 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
14511 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14512 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
14513 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14514 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
14515 | } | ||
14516 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14517 | find interpretation(problem,interpretation); | ||
14518 | PartialInterpretation.newElements(interpretation,element); | ||
14519 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
14520 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14521 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14522 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14523 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14524 | } | ||
14525 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14526 | find interpretation(problem,interpretation); | ||
14527 | PartialInterpretation.newElements(interpretation,element); | ||
14528 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
14529 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14530 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14531 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14532 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14533 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14534 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14535 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14536 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14537 | } | ||
14538 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14539 | find interpretation(problem,interpretation); | ||
14540 | PartialInterpretation.newElements(interpretation,element); | ||
14541 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
14542 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
14543 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14544 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
14545 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14546 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14547 | } | ||
14548 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14549 | find interpretation(problem,interpretation); | ||
14550 | PartialInterpretation.newElements(interpretation,element); | ||
14551 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
14552 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14553 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14554 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14555 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14556 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14557 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14558 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14559 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14560 | } | ||
14561 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14562 | find interpretation(problem,interpretation); | ||
14563 | PartialInterpretation.newElements(interpretation,element); | ||
14564 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
14565 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14566 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
14567 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14568 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14569 | } | ||
14570 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14571 | find interpretation(problem,interpretation); | ||
14572 | PartialInterpretation.newElements(interpretation,element); | ||
14573 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
14574 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14575 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14576 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14577 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14578 | } | ||
14579 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14580 | find interpretation(problem,interpretation); | ||
14581 | PartialInterpretation.newElements(interpretation,element); | ||
14582 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
14583 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14584 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14585 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14586 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14587 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14588 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14589 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14590 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14591 | } | ||
14592 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14593 | find interpretation(problem,interpretation); | ||
14594 | PartialInterpretation.newElements(interpretation,element); | ||
14595 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
14596 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14597 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14598 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14599 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14600 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14601 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14602 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14603 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14604 | } | ||
14605 | |||
14606 | ////////// | ||
14607 | // 4.3 Relation refinement | ||
14608 | ////////// | ||
14609 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
14610 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14611 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
14612 | from: DefinedElement, to: DefinedElement) | ||
14613 | { | ||
14614 | find interpretation(problem,interpretation); | ||
14615 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14616 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
14617 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
14618 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
14619 | find mustExist(problem, interpretation, from); | ||
14620 | find mustExist(problem, interpretation, to); | ||
14621 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
14622 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
14623 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
14624 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
14625 | } | ||
14626 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
14627 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
14628 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
14629 | |||
14630 | ////////// | ||
14631 | // 0. Util | ||
14632 | ////////// | ||
14633 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14634 | PartialInterpretation.problem(interpretation,problem); | ||
14635 | } | ||
14636 | |||
14637 | ///////////////////////// | ||
14638 | // 0.1 Existence | ||
14639 | ///////////////////////// | ||
14640 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14641 | find interpretation(problem,interpretation); | ||
14642 | LogicProblem.elements(problem,element); | ||
14643 | } or { | ||
14644 | find interpretation(problem,interpretation); | ||
14645 | PartialInterpretation.newElements(interpretation,element); | ||
14646 | } | ||
14647 | |||
14648 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14649 | find mustExist(problem,interpretation,element); | ||
14650 | } or { | ||
14651 | find interpretation(problem,interpretation); | ||
14652 | neg find elementCloseWorld(element); | ||
14653 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14654 | } | ||
14655 | |||
14656 | private pattern elementCloseWorld(element:DefinedElement) { | ||
14657 | PartialInterpretation.openWorldElements(i,element); | ||
14658 | PartialInterpretation.maxNewElements(i,0); | ||
14659 | } or { | ||
14660 | Scope.targetTypeInterpretation(scope,interpretation); | ||
14661 | PartialTypeInterpratation.elements(interpretation,element); | ||
14662 | Scope.maxNewElements(scope,0); | ||
14663 | } | ||
14664 | |||
14665 | //////////////////////// | ||
14666 | // 0.2 Equivalence | ||
14667 | //////////////////////// | ||
14668 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
14669 | find mayExist(problem,interpretation,a); | ||
14670 | find mayExist(problem,interpretation,b); | ||
14671 | a == b; | ||
14672 | } | ||
14673 | |||
14674 | //////////////////////// | ||
14675 | // 0.3 Required Patterns by TypeIndexer | ||
14676 | //////////////////////// | ||
14677 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
14678 | find interpretation(problem,interpretation); | ||
14679 | LogicProblem.types(problem,type); | ||
14680 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14681 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14682 | } | ||
14683 | |||
14684 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
14685 | find interpretation(problem,interpretation); | ||
14686 | LogicProblem.types(problem,type); | ||
14687 | TypeDefinition.elements(type,element); | ||
14688 | } or { | ||
14689 | find interpretation(problem,interpretation); | ||
14690 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
14691 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
14692 | } | ||
14693 | |||
14694 | private pattern isPrimitive(element: PrimitiveElement) { | ||
14695 | PrimitiveElement(element); | ||
14696 | } | ||
14697 | |||
14698 | ////////// | ||
14699 | // 1. Problem-Specific Base Indexers | ||
14700 | ////////// | ||
14701 | // 1.1 Type Indexers | ||
14702 | ////////// | ||
14703 | // 1.1.1 primitive Type Indexers | ||
14704 | ////////// | ||
14705 | |||
14706 | ////////// | ||
14707 | // 1.1.2 domain-specific Type Indexers | ||
14708 | ////////// | ||
14709 | /** | ||
14710 | * An element must be an instance of type "Pseudostate class". | ||
14711 | */ | ||
14712 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14713 | Type.name(type,"Pseudostate class"); | ||
14714 | find directInstanceOf(problem,interpretation,element,type); | ||
14715 | } | ||
14716 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14717 | find interpretation(problem,interpretation); | ||
14718 | PartialInterpretation.scopes(interpretation,scope); | ||
14719 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14720 | Scope.maxNewElements(scope,0); | ||
14721 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14722 | Type.name(type,"Pseudostate class"); | ||
14723 | } | ||
14724 | |||
14725 | /** | ||
14726 | * An element may be an instance of type "Pseudostate class". | ||
14727 | */ | ||
14728 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14729 | { | ||
14730 | find interpretation(problem,interpretation); | ||
14731 | PartialInterpretation.newElements(interpretation,element); | ||
14732 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14733 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14734 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14735 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14736 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14737 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14738 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14739 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14740 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
14741 | neg find isPrimitive(element); | ||
14742 | } or { | ||
14743 | find interpretation(problem,interpretation); | ||
14744 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14745 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14746 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14747 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14748 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14749 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14750 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14751 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14752 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14753 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
14754 | neg find isPrimitive(element); | ||
14755 | } or | ||
14756 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
14757 | /** | ||
14758 | * An element must be an instance of type "Vertex class". | ||
14759 | */ | ||
14760 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14761 | Type.name(type,"Vertex class"); | ||
14762 | find directInstanceOf(problem,interpretation,element,type); | ||
14763 | } | ||
14764 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14765 | find interpretation(problem,interpretation); | ||
14766 | PartialInterpretation.scopes(interpretation,scope); | ||
14767 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14768 | Scope.maxNewElements(scope,0); | ||
14769 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14770 | Type.name(type,"Vertex class"); | ||
14771 | } | ||
14772 | |||
14773 | /** | ||
14774 | * An element may be an instance of type "Vertex class". | ||
14775 | */ | ||
14776 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14777 | { | ||
14778 | find interpretation(problem,interpretation); | ||
14779 | PartialInterpretation.newElements(interpretation,element); | ||
14780 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14781 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14782 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
14783 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14784 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14785 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
14786 | neg find isPrimitive(element); | ||
14787 | } or { | ||
14788 | find interpretation(problem,interpretation); | ||
14789 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14790 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14791 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14792 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
14793 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14794 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14795 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
14796 | neg find isPrimitive(element); | ||
14797 | } or | ||
14798 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
14799 | /** | ||
14800 | * An element must be an instance of type "Region class". | ||
14801 | */ | ||
14802 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14803 | Type.name(type,"Region class"); | ||
14804 | find directInstanceOf(problem,interpretation,element,type); | ||
14805 | } | ||
14806 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14807 | find interpretation(problem,interpretation); | ||
14808 | PartialInterpretation.scopes(interpretation,scope); | ||
14809 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14810 | Scope.maxNewElements(scope,0); | ||
14811 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14812 | Type.name(type,"Region class"); | ||
14813 | } | ||
14814 | |||
14815 | /** | ||
14816 | * An element may be an instance of type "Region class". | ||
14817 | */ | ||
14818 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14819 | { | ||
14820 | find interpretation(problem,interpretation); | ||
14821 | PartialInterpretation.newElements(interpretation,element); | ||
14822 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14823 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14824 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14825 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
14826 | neg find isPrimitive(element); | ||
14827 | } or { | ||
14828 | find interpretation(problem,interpretation); | ||
14829 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14830 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14831 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14832 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14833 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
14834 | neg find isPrimitive(element); | ||
14835 | } or | ||
14836 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
14837 | /** | ||
14838 | * An element must be an instance of type "Transition class". | ||
14839 | */ | ||
14840 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14841 | Type.name(type,"Transition class"); | ||
14842 | find directInstanceOf(problem,interpretation,element,type); | ||
14843 | } | ||
14844 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14845 | find interpretation(problem,interpretation); | ||
14846 | PartialInterpretation.scopes(interpretation,scope); | ||
14847 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14848 | Scope.maxNewElements(scope,0); | ||
14849 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14850 | Type.name(type,"Transition class"); | ||
14851 | } | ||
14852 | |||
14853 | /** | ||
14854 | * An element may be an instance of type "Transition class". | ||
14855 | */ | ||
14856 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14857 | { | ||
14858 | find interpretation(problem,interpretation); | ||
14859 | PartialInterpretation.newElements(interpretation,element); | ||
14860 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14861 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14862 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14863 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
14864 | neg find isPrimitive(element); | ||
14865 | } or { | ||
14866 | find interpretation(problem,interpretation); | ||
14867 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14868 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14869 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14870 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14871 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
14872 | neg find isPrimitive(element); | ||
14873 | } or | ||
14874 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
14875 | /** | ||
14876 | * An element must be an instance of type "Statechart class". | ||
14877 | */ | ||
14878 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14879 | Type.name(type,"Statechart class"); | ||
14880 | find directInstanceOf(problem,interpretation,element,type); | ||
14881 | } | ||
14882 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14883 | find interpretation(problem,interpretation); | ||
14884 | PartialInterpretation.scopes(interpretation,scope); | ||
14885 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14886 | Scope.maxNewElements(scope,0); | ||
14887 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14888 | Type.name(type,"Statechart class"); | ||
14889 | } | ||
14890 | |||
14891 | /** | ||
14892 | * An element may be an instance of type "Statechart class". | ||
14893 | */ | ||
14894 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14895 | { | ||
14896 | find interpretation(problem,interpretation); | ||
14897 | PartialInterpretation.newElements(interpretation,element); | ||
14898 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
14899 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14900 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14901 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14902 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
14903 | neg find isPrimitive(element); | ||
14904 | } or { | ||
14905 | find interpretation(problem,interpretation); | ||
14906 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14907 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
14908 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14909 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14910 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14911 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
14912 | neg find isPrimitive(element); | ||
14913 | } or | ||
14914 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
14915 | /** | ||
14916 | * An element must be an instance of type "Entry class". | ||
14917 | */ | ||
14918 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14919 | Type.name(type,"Entry class"); | ||
14920 | find directInstanceOf(problem,interpretation,element,type); | ||
14921 | } | ||
14922 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14923 | find interpretation(problem,interpretation); | ||
14924 | PartialInterpretation.scopes(interpretation,scope); | ||
14925 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14926 | Scope.maxNewElements(scope,0); | ||
14927 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14928 | Type.name(type,"Entry class"); | ||
14929 | } | ||
14930 | |||
14931 | /** | ||
14932 | * An element may be an instance of type "Entry class". | ||
14933 | */ | ||
14934 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14935 | { | ||
14936 | find interpretation(problem,interpretation); | ||
14937 | PartialInterpretation.newElements(interpretation,element); | ||
14938 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14939 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14940 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14941 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14942 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14943 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14944 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14945 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
14946 | neg find isPrimitive(element); | ||
14947 | } or { | ||
14948 | find interpretation(problem,interpretation); | ||
14949 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14950 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14951 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14952 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14953 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14954 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14955 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14956 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14957 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
14958 | neg find isPrimitive(element); | ||
14959 | } or | ||
14960 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
14961 | /** | ||
14962 | * An element must be an instance of type "Synchronization class". | ||
14963 | */ | ||
14964 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14965 | Type.name(type,"Synchronization class"); | ||
14966 | find directInstanceOf(problem,interpretation,element,type); | ||
14967 | } | ||
14968 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14969 | find interpretation(problem,interpretation); | ||
14970 | PartialInterpretation.scopes(interpretation,scope); | ||
14971 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14972 | Scope.maxNewElements(scope,0); | ||
14973 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14974 | Type.name(type,"Synchronization class"); | ||
14975 | } | ||
14976 | |||
14977 | /** | ||
14978 | * An element may be an instance of type "Synchronization class". | ||
14979 | */ | ||
14980 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14981 | { | ||
14982 | find interpretation(problem,interpretation); | ||
14983 | PartialInterpretation.newElements(interpretation,element); | ||
14984 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14985 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14986 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14987 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14988 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14989 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14990 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14991 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
14992 | neg find isPrimitive(element); | ||
14993 | } or { | ||
14994 | find interpretation(problem,interpretation); | ||
14995 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14996 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14997 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14998 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14999 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15000 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15001 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15002 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15003 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
15004 | neg find isPrimitive(element); | ||
15005 | } or | ||
15006 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
15007 | /** | ||
15008 | * An element must be an instance of type "State class". | ||
15009 | */ | ||
15010 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15011 | Type.name(type,"State class"); | ||
15012 | find directInstanceOf(problem,interpretation,element,type); | ||
15013 | } | ||
15014 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15015 | find interpretation(problem,interpretation); | ||
15016 | PartialInterpretation.scopes(interpretation,scope); | ||
15017 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15018 | Scope.maxNewElements(scope,0); | ||
15019 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15020 | Type.name(type,"State class"); | ||
15021 | } | ||
15022 | |||
15023 | /** | ||
15024 | * An element may be an instance of type "State class". | ||
15025 | */ | ||
15026 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15027 | { | ||
15028 | find interpretation(problem,interpretation); | ||
15029 | PartialInterpretation.newElements(interpretation,element); | ||
15030 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15031 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15032 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15033 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15034 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15035 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
15036 | neg find isPrimitive(element); | ||
15037 | } or { | ||
15038 | find interpretation(problem,interpretation); | ||
15039 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15040 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15041 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15042 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15043 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15044 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15045 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
15046 | neg find isPrimitive(element); | ||
15047 | } or | ||
15048 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
15049 | /** | ||
15050 | * An element must be an instance of type "RegularState class". | ||
15051 | */ | ||
15052 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15053 | Type.name(type,"RegularState class"); | ||
15054 | find directInstanceOf(problem,interpretation,element,type); | ||
15055 | } | ||
15056 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15057 | find interpretation(problem,interpretation); | ||
15058 | PartialInterpretation.scopes(interpretation,scope); | ||
15059 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15060 | Scope.maxNewElements(scope,0); | ||
15061 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15062 | Type.name(type,"RegularState class"); | ||
15063 | } | ||
15064 | |||
15065 | /** | ||
15066 | * An element may be an instance of type "RegularState class". | ||
15067 | */ | ||
15068 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15069 | { | ||
15070 | find interpretation(problem,interpretation); | ||
15071 | PartialInterpretation.newElements(interpretation,element); | ||
15072 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15073 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15074 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15075 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15076 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15077 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
15078 | neg find isPrimitive(element); | ||
15079 | } or { | ||
15080 | find interpretation(problem,interpretation); | ||
15081 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15082 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15083 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15084 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15085 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15086 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15087 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
15088 | neg find isPrimitive(element); | ||
15089 | } or | ||
15090 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
15091 | /** | ||
15092 | * An element must be an instance of type "CompositeElement class". | ||
15093 | */ | ||
15094 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15095 | Type.name(type,"CompositeElement class"); | ||
15096 | find directInstanceOf(problem,interpretation,element,type); | ||
15097 | } | ||
15098 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15099 | find interpretation(problem,interpretation); | ||
15100 | PartialInterpretation.scopes(interpretation,scope); | ||
15101 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15102 | Scope.maxNewElements(scope,0); | ||
15103 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15104 | Type.name(type,"CompositeElement class"); | ||
15105 | } | ||
15106 | |||
15107 | /** | ||
15108 | * An element may be an instance of type "CompositeElement class". | ||
15109 | */ | ||
15110 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15111 | { | ||
15112 | find interpretation(problem,interpretation); | ||
15113 | PartialInterpretation.newElements(interpretation,element); | ||
15114 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15115 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
15116 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15117 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15118 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15119 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
15120 | neg find isPrimitive(element); | ||
15121 | } or { | ||
15122 | find interpretation(problem,interpretation); | ||
15123 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15124 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15125 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
15126 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15127 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15128 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15129 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
15130 | neg find isPrimitive(element); | ||
15131 | } or | ||
15132 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
15133 | /** | ||
15134 | * An element must be an instance of type "Choice class". | ||
15135 | */ | ||
15136 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15137 | Type.name(type,"Choice class"); | ||
15138 | find directInstanceOf(problem,interpretation,element,type); | ||
15139 | } | ||
15140 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15141 | find interpretation(problem,interpretation); | ||
15142 | PartialInterpretation.scopes(interpretation,scope); | ||
15143 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15144 | Scope.maxNewElements(scope,0); | ||
15145 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15146 | Type.name(type,"Choice class"); | ||
15147 | } | ||
15148 | |||
15149 | /** | ||
15150 | * An element may be an instance of type "Choice class". | ||
15151 | */ | ||
15152 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15153 | { | ||
15154 | find interpretation(problem,interpretation); | ||
15155 | PartialInterpretation.newElements(interpretation,element); | ||
15156 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15157 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15158 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15159 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15160 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15161 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15162 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15163 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
15164 | neg find isPrimitive(element); | ||
15165 | } or { | ||
15166 | find interpretation(problem,interpretation); | ||
15167 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15168 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15169 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15170 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15171 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15172 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15173 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15174 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15175 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
15176 | neg find isPrimitive(element); | ||
15177 | } or | ||
15178 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
15179 | /** | ||
15180 | * An element must be an instance of type "Exit class". | ||
15181 | */ | ||
15182 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15183 | Type.name(type,"Exit class"); | ||
15184 | find directInstanceOf(problem,interpretation,element,type); | ||
15185 | } | ||
15186 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15187 | find interpretation(problem,interpretation); | ||
15188 | PartialInterpretation.scopes(interpretation,scope); | ||
15189 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15190 | Scope.maxNewElements(scope,0); | ||
15191 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15192 | Type.name(type,"Exit class"); | ||
15193 | } | ||
15194 | |||
15195 | /** | ||
15196 | * An element may be an instance of type "Exit class". | ||
15197 | */ | ||
15198 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15199 | { | ||
15200 | find interpretation(problem,interpretation); | ||
15201 | PartialInterpretation.newElements(interpretation,element); | ||
15202 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15203 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15204 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15205 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15206 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15207 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15208 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15209 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
15210 | neg find isPrimitive(element); | ||
15211 | } or { | ||
15212 | find interpretation(problem,interpretation); | ||
15213 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15214 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15215 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15216 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15217 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15218 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15219 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15220 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15221 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
15222 | neg find isPrimitive(element); | ||
15223 | } or | ||
15224 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
15225 | /** | ||
15226 | * An element must be an instance of type "FinalState class". | ||
15227 | */ | ||
15228 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15229 | Type.name(type,"FinalState class"); | ||
15230 | find directInstanceOf(problem,interpretation,element,type); | ||
15231 | } | ||
15232 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15233 | find interpretation(problem,interpretation); | ||
15234 | PartialInterpretation.scopes(interpretation,scope); | ||
15235 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15236 | Scope.maxNewElements(scope,0); | ||
15237 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15238 | Type.name(type,"FinalState class"); | ||
15239 | } | ||
15240 | |||
15241 | /** | ||
15242 | * An element may be an instance of type "FinalState class". | ||
15243 | */ | ||
15244 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15245 | { | ||
15246 | find interpretation(problem,interpretation); | ||
15247 | PartialInterpretation.newElements(interpretation,element); | ||
15248 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15249 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15250 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15251 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15252 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
15253 | neg find isPrimitive(element); | ||
15254 | } or { | ||
15255 | find interpretation(problem,interpretation); | ||
15256 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15257 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15258 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15259 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15260 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15261 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
15262 | neg find isPrimitive(element); | ||
15263 | } or | ||
15264 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
15265 | /** | ||
15266 | * An element must be an instance of type "Statechart class DefinedPart". | ||
15267 | */ | ||
15268 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15269 | Type.name(type,"Statechart class DefinedPart"); | ||
15270 | find directInstanceOf(problem,interpretation,element,type); | ||
15271 | } | ||
15272 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15273 | find interpretation(problem,interpretation); | ||
15274 | PartialInterpretation.scopes(interpretation,scope); | ||
15275 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15276 | Scope.maxNewElements(scope,0); | ||
15277 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15278 | Type.name(type,"Statechart class DefinedPart"); | ||
15279 | } | ||
15280 | |||
15281 | /** | ||
15282 | * An element may be an instance of type "Statechart class DefinedPart". | ||
15283 | */ | ||
15284 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15285 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
15286 | /** | ||
15287 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
15288 | */ | ||
15289 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15290 | Type.name(type,"Statechart class UndefinedPart"); | ||
15291 | find directInstanceOf(problem,interpretation,element,type); | ||
15292 | } | ||
15293 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15294 | find interpretation(problem,interpretation); | ||
15295 | PartialInterpretation.scopes(interpretation,scope); | ||
15296 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15297 | Scope.maxNewElements(scope,0); | ||
15298 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15299 | Type.name(type,"Statechart class UndefinedPart"); | ||
15300 | } | ||
15301 | |||
15302 | /** | ||
15303 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
15304 | */ | ||
15305 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15306 | { | ||
15307 | find interpretation(problem,interpretation); | ||
15308 | PartialInterpretation.newElements(interpretation,element); | ||
15309 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15310 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15311 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15312 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
15313 | neg find isPrimitive(element); | ||
15314 | } or { | ||
15315 | find interpretation(problem,interpretation); | ||
15316 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15317 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15318 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15319 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15320 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
15321 | neg find isPrimitive(element); | ||
15322 | } or | ||
15323 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
15324 | /** | ||
15325 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
15326 | */ | ||
15327 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15328 | Type.name(type,"CompositeElement class DefinedPart"); | ||
15329 | find directInstanceOf(problem,interpretation,element,type); | ||
15330 | } | ||
15331 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15332 | find interpretation(problem,interpretation); | ||
15333 | PartialInterpretation.scopes(interpretation,scope); | ||
15334 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15335 | Scope.maxNewElements(scope,0); | ||
15336 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15337 | Type.name(type,"CompositeElement class DefinedPart"); | ||
15338 | } | ||
15339 | |||
15340 | /** | ||
15341 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
15342 | */ | ||
15343 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15344 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
15345 | /** | ||
15346 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
15347 | */ | ||
15348 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15349 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
15350 | find directInstanceOf(problem,interpretation,element,type); | ||
15351 | } | ||
15352 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15353 | find interpretation(problem,interpretation); | ||
15354 | PartialInterpretation.scopes(interpretation,scope); | ||
15355 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15356 | Scope.maxNewElements(scope,0); | ||
15357 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15358 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
15359 | } | ||
15360 | |||
15361 | /** | ||
15362 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
15363 | */ | ||
15364 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15365 | { | ||
15366 | find interpretation(problem,interpretation); | ||
15367 | PartialInterpretation.newElements(interpretation,element); | ||
15368 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15369 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15370 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15371 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15372 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
15373 | neg find isPrimitive(element); | ||
15374 | } or { | ||
15375 | find interpretation(problem,interpretation); | ||
15376 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15377 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15378 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15379 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15380 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15381 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
15382 | neg find isPrimitive(element); | ||
15383 | } or | ||
15384 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
15385 | |||
15386 | ////////// | ||
15387 | // 1.2 Relation Declaration Indexers | ||
15388 | ////////// | ||
15389 | /** | ||
15390 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
15391 | */ | ||
15392 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
15393 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15394 | source: DefinedElement, target:DefinedElement) | ||
15395 | { | ||
15396 | find interpretation(problem,interpretation); | ||
15397 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15398 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
15399 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15400 | BinaryElementRelationLink.param1(link,source); | ||
15401 | BinaryElementRelationLink.param2(link,target); | ||
15402 | } | ||
15403 | /** | ||
15404 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
15405 | */ | ||
15406 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
15407 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15408 | source: DefinedElement, target:DefinedElement) | ||
15409 | { | ||
15410 | find interpretation(problem,interpretation); | ||
15411 | // The two endpoint of the link have to exist | ||
15412 | find mayExist(problem, interpretation, source); | ||
15413 | find mayExist(problem, interpretation, target); | ||
15414 | // Type consistency | ||
15415 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
15416 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
15417 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
15418 | // the upper bound of the opposite reference multiplicity should be considered. | ||
15419 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
15420 | check(numberOfExistingOppositeReferences < 1); | ||
15421 | } or { | ||
15422 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
15423 | } | ||
15424 | /** | ||
15425 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
15426 | */ | ||
15427 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
15428 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15429 | source: DefinedElement, target:DefinedElement) | ||
15430 | { | ||
15431 | find interpretation(problem,interpretation); | ||
15432 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15433 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
15434 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15435 | BinaryElementRelationLink.param1(link,source); | ||
15436 | BinaryElementRelationLink.param2(link,target); | ||
15437 | } | ||
15438 | /** | ||
15439 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
15440 | */ | ||
15441 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
15442 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15443 | source: DefinedElement, target:DefinedElement) | ||
15444 | { | ||
15445 | find interpretation(problem,interpretation); | ||
15446 | // The two endpoint of the link have to exist | ||
15447 | find mayExist(problem, interpretation, source); | ||
15448 | find mayExist(problem, interpretation, target); | ||
15449 | // Type consistency | ||
15450 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
15451 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
15452 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
15453 | // the upper bound of the opposite reference multiplicity should be considered. | ||
15454 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
15455 | check(numberOfExistingOppositeReferences < 1); | ||
15456 | // The reference is containment, then a new reference cannot be create if: | ||
15457 | // 1. Multiple parents | ||
15458 | neg find mustContains4(problem,interpretation,_,target); | ||
15459 | // 2. Circle in the containment hierarchy | ||
15460 | neg find mustTransitiveContains(source,target); | ||
15461 | } or { | ||
15462 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
15463 | } | ||
15464 | /** | ||
15465 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
15466 | */ | ||
15467 | private pattern mustInRelationvertices_reference_Region( | ||
15468 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15469 | source: DefinedElement, target:DefinedElement) | ||
15470 | { | ||
15471 | find interpretation(problem,interpretation); | ||
15472 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15473 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
15474 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15475 | BinaryElementRelationLink.param1(link,source); | ||
15476 | BinaryElementRelationLink.param2(link,target); | ||
15477 | } | ||
15478 | /** | ||
15479 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
15480 | */ | ||
15481 | private pattern mayInRelationvertices_reference_Region( | ||
15482 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15483 | source: DefinedElement, target:DefinedElement) | ||
15484 | { | ||
15485 | find interpretation(problem,interpretation); | ||
15486 | // The two endpoint of the link have to exist | ||
15487 | find mayExist(problem, interpretation, source); | ||
15488 | find mayExist(problem, interpretation, target); | ||
15489 | // Type consistency | ||
15490 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
15491 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
15492 | // The reference is containment, then a new reference cannot be create if: | ||
15493 | // 1. Multiple parents | ||
15494 | neg find mustContains4(problem,interpretation,_,target); | ||
15495 | // 2. Circle in the containment hierarchy | ||
15496 | neg find mustTransitiveContains(source,target); | ||
15497 | } or { | ||
15498 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
15499 | } | ||
15500 | /** | ||
15501 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
15502 | */ | ||
15503 | private pattern mustInRelationtarget_reference_Transition( | ||
15504 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15505 | source: DefinedElement, target:DefinedElement) | ||
15506 | { | ||
15507 | find interpretation(problem,interpretation); | ||
15508 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15509 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
15510 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15511 | BinaryElementRelationLink.param1(link,source); | ||
15512 | BinaryElementRelationLink.param2(link,target); | ||
15513 | } | ||
15514 | /** | ||
15515 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
15516 | */ | ||
15517 | private pattern mayInRelationtarget_reference_Transition( | ||
15518 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15519 | source: DefinedElement, target:DefinedElement) | ||
15520 | { | ||
15521 | find interpretation(problem,interpretation); | ||
15522 | // The two endpoint of the link have to exist | ||
15523 | find mayExist(problem, interpretation, source); | ||
15524 | find mayExist(problem, interpretation, target); | ||
15525 | // Type consistency | ||
15526 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
15527 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
15528 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
15529 | // the upper bound of the multiplicity should be considered. | ||
15530 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
15531 | check(numberOfExistingReferences < 1); | ||
15532 | } or { | ||
15533 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
15534 | } | ||
15535 | /** | ||
15536 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
15537 | */ | ||
15538 | private pattern mustInRelationsource_reference_Transition( | ||
15539 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15540 | source: DefinedElement, target:DefinedElement) | ||
15541 | { | ||
15542 | find interpretation(problem,interpretation); | ||
15543 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15544 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
15545 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15546 | BinaryElementRelationLink.param1(link,source); | ||
15547 | BinaryElementRelationLink.param2(link,target); | ||
15548 | } | ||
15549 | /** | ||
15550 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
15551 | */ | ||
15552 | private pattern mayInRelationsource_reference_Transition( | ||
15553 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15554 | source: DefinedElement, target:DefinedElement) | ||
15555 | { | ||
15556 | find interpretation(problem,interpretation); | ||
15557 | // The two endpoint of the link have to exist | ||
15558 | find mayExist(problem, interpretation, source); | ||
15559 | find mayExist(problem, interpretation, target); | ||
15560 | // Type consistency | ||
15561 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
15562 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
15563 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
15564 | // the upper bound of the multiplicity should be considered. | ||
15565 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
15566 | check(numberOfExistingReferences < 1); | ||
15567 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
15568 | // 1. Multiple parents | ||
15569 | neg find mustContains4(problem,interpretation,source,_); | ||
15570 | // 2. Circle in the containment hierarchy | ||
15571 | neg find mustTransitiveContains(source,target); | ||
15572 | } or { | ||
15573 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
15574 | } | ||
15575 | /** | ||
15576 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
15577 | */ | ||
15578 | private pattern mustInRelationregions_reference_CompositeElement( | ||
15579 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15580 | source: DefinedElement, target:DefinedElement) | ||
15581 | { | ||
15582 | find interpretation(problem,interpretation); | ||
15583 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15584 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
15585 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15586 | BinaryElementRelationLink.param1(link,source); | ||
15587 | BinaryElementRelationLink.param2(link,target); | ||
15588 | } | ||
15589 | /** | ||
15590 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
15591 | */ | ||
15592 | private pattern mayInRelationregions_reference_CompositeElement( | ||
15593 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15594 | source: DefinedElement, target:DefinedElement) | ||
15595 | { | ||
15596 | find interpretation(problem,interpretation); | ||
15597 | // The two endpoint of the link have to exist | ||
15598 | find mayExist(problem, interpretation, source); | ||
15599 | find mayExist(problem, interpretation, target); | ||
15600 | // Type consistency | ||
15601 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
15602 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
15603 | // The reference is containment, then a new reference cannot be create if: | ||
15604 | // 1. Multiple parents | ||
15605 | neg find mustContains4(problem,interpretation,_,target); | ||
15606 | // 2. Circle in the containment hierarchy | ||
15607 | neg find mustTransitiveContains(source,target); | ||
15608 | } or { | ||
15609 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
15610 | } | ||
15611 | |||
15612 | ////////// | ||
15613 | // 1.3 Relation Definition Indexers | ||
15614 | ////////// | ||
15615 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
15616 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
15617 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15618 | var_r1, var_e1) | ||
15619 | { | ||
15620 | find interpretation(problem,interpretation); | ||
15621 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15622 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
15623 | // r1 is exported | ||
15624 | // e1 is exported | ||
15625 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15626 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
15627 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15628 | var_virtual0 == var_e1; | ||
15629 | } | ||
15630 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
15631 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15632 | var_r1, var_e1) | ||
15633 | { | ||
15634 | find interpretation(problem,interpretation); | ||
15635 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15636 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
15637 | // r1 is exported | ||
15638 | // e1 is exported | ||
15639 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15640 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
15641 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15642 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
15643 | } | ||
15644 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
15645 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15646 | var_r1, var_e1) | ||
15647 | { | ||
15648 | find interpretation(problem,interpretation); | ||
15649 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15650 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
15651 | // r1 is exported | ||
15652 | // e1 is exported | ||
15653 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15654 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
15655 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15656 | var_virtual0 == var_e1; | ||
15657 | } | ||
15658 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
15659 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
15660 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15661 | var_r1) | ||
15662 | { | ||
15663 | find interpretation(problem,interpretation); | ||
15664 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15665 | // r1 is exported | ||
15666 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
15667 | } | ||
15668 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
15669 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15670 | var_r1) | ||
15671 | { | ||
15672 | find interpretation(problem,interpretation); | ||
15673 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15674 | // r1 is exported | ||
15675 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
15676 | } | ||
15677 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
15678 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15679 | var_r1) | ||
15680 | { | ||
15681 | find interpretation(problem,interpretation); | ||
15682 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15683 | // r1 is exported | ||
15684 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
15685 | } | ||
15686 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
15687 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
15688 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15689 | var_r) | ||
15690 | { | ||
15691 | find interpretation(problem,interpretation); | ||
15692 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
15693 | // r is exported | ||
15694 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
15695 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
15696 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
15697 | } | ||
15698 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
15699 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15700 | var_r) | ||
15701 | { | ||
15702 | find interpretation(problem,interpretation); | ||
15703 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
15704 | // r is exported | ||
15705 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
15706 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
15707 | var_e1 != var_e2; | ||
15708 | } | ||
15709 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
15710 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15711 | var_r) | ||
15712 | { | ||
15713 | find interpretation(problem,interpretation); | ||
15714 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
15715 | // r is exported | ||
15716 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
15717 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
15718 | var_e1 != var_e2; | ||
15719 | } | ||
15720 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
15721 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
15722 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15723 | var_t, var_src, var_trg) | ||
15724 | { | ||
15725 | find interpretation(problem,interpretation); | ||
15726 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15727 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
15728 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
15729 | // t is exported | ||
15730 | // src is exported | ||
15731 | // trg is exported | ||
15732 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15733 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
15734 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15735 | var_virtual0 == var_src; | ||
15736 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15737 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
15738 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
15739 | var_virtual1 == var_trg; | ||
15740 | } | ||
15741 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
15742 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15743 | var_t, var_src, var_trg) | ||
15744 | { | ||
15745 | find interpretation(problem,interpretation); | ||
15746 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
15747 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
15748 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
15749 | // t is exported | ||
15750 | // src is exported | ||
15751 | // trg is exported | ||
15752 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
15753 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
15754 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15755 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
15756 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
15757 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
15758 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
15759 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
15760 | } | ||
15761 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
15762 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15763 | var_t, var_src, var_trg) | ||
15764 | { | ||
15765 | find interpretation(problem,interpretation); | ||
15766 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15767 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
15768 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
15769 | // t is exported | ||
15770 | // src is exported | ||
15771 | // trg is exported | ||
15772 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15773 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
15774 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15775 | var_virtual0 == var_src; | ||
15776 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15777 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
15778 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
15779 | var_virtual1 == var_trg; | ||
15780 | } | ||
15781 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
15782 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
15783 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15784 | var_t, var_e) | ||
15785 | { | ||
15786 | find interpretation(problem,interpretation); | ||
15787 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15788 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15789 | // t is exported | ||
15790 | // e is exported | ||
15791 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
15792 | } | ||
15793 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
15794 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15795 | var_t, var_e) | ||
15796 | { | ||
15797 | find interpretation(problem,interpretation); | ||
15798 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
15799 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
15800 | // t is exported | ||
15801 | // e is exported | ||
15802 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
15803 | } | ||
15804 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
15805 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15806 | var_t, var_e) | ||
15807 | { | ||
15808 | find interpretation(problem,interpretation); | ||
15809 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15810 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15811 | // t is exported | ||
15812 | // e is exported | ||
15813 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
15814 | } | ||
15815 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
15816 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
15817 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15818 | var_e) | ||
15819 | { | ||
15820 | find interpretation(problem,interpretation); | ||
15821 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15822 | // e is exported | ||
15823 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
15824 | } | ||
15825 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
15826 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15827 | var_e) | ||
15828 | { | ||
15829 | find interpretation(problem,interpretation); | ||
15830 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
15831 | // e is exported | ||
15832 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
15833 | } | ||
15834 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
15835 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15836 | var_e) | ||
15837 | { | ||
15838 | find interpretation(problem,interpretation); | ||
15839 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15840 | // e is exported | ||
15841 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
15842 | } | ||
15843 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
15844 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
15845 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15846 | var_e, var_t1, var_t2) | ||
15847 | { | ||
15848 | find interpretation(problem,interpretation); | ||
15849 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15850 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
15851 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
15852 | // e is exported | ||
15853 | // t1 is exported | ||
15854 | // t2 is exported | ||
15855 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15856 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
15857 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15858 | var_virtual0 == var_t1; | ||
15859 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15860 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
15861 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
15862 | var_virtual1 == var_t2; | ||
15863 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
15864 | } | ||
15865 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
15866 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15867 | var_e, var_t1, var_t2) | ||
15868 | { | ||
15869 | find interpretation(problem,interpretation); | ||
15870 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
15871 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
15872 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
15873 | // e is exported | ||
15874 | // t1 is exported | ||
15875 | // t2 is exported | ||
15876 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
15877 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
15878 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15879 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
15880 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
15881 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
15882 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
15883 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
15884 | var_t1 != var_t2; | ||
15885 | } | ||
15886 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
15887 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15888 | var_e, var_t1, var_t2) | ||
15889 | { | ||
15890 | find interpretation(problem,interpretation); | ||
15891 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15892 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
15893 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
15894 | // e is exported | ||
15895 | // t1 is exported | ||
15896 | // t2 is exported | ||
15897 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15898 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
15899 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15900 | var_virtual0 == var_t1; | ||
15901 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
15902 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
15903 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
15904 | var_virtual1 == var_t2; | ||
15905 | var_t1 != var_t2; | ||
15906 | } | ||
15907 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
15908 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
15909 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15910 | var_t, var_e) | ||
15911 | { | ||
15912 | find interpretation(problem,interpretation); | ||
15913 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15914 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
15915 | // t is exported | ||
15916 | // e is exported | ||
15917 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
15918 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
15919 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15920 | var_virtual0 == var_t; | ||
15921 | } | ||
15922 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
15923 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15924 | var_t, var_e) | ||
15925 | { | ||
15926 | find interpretation(problem,interpretation); | ||
15927 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
15928 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
15929 | // t is exported | ||
15930 | // e is exported | ||
15931 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
15932 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
15933 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15934 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
15935 | } | ||
15936 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
15937 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15938 | var_t, var_e) | ||
15939 | { | ||
15940 | find interpretation(problem,interpretation); | ||
15941 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15942 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
15943 | // t is exported | ||
15944 | // e is exported | ||
15945 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
15946 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
15947 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15948 | var_virtual0 == var_t; | ||
15949 | } | ||
15950 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
15951 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
15952 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15953 | var_t, var_f) | ||
15954 | { | ||
15955 | find interpretation(problem,interpretation); | ||
15956 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15957 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
15958 | // t is exported | ||
15959 | // f is exported | ||
15960 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
15961 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
15962 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15963 | var_virtual0 == var_t; | ||
15964 | } | ||
15965 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
15966 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15967 | var_t, var_f) | ||
15968 | { | ||
15969 | find interpretation(problem,interpretation); | ||
15970 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
15971 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
15972 | // t is exported | ||
15973 | // f is exported | ||
15974 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
15975 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
15976 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15977 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
15978 | } | ||
15979 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
15980 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15981 | var_t, var_f) | ||
15982 | { | ||
15983 | find interpretation(problem,interpretation); | ||
15984 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15985 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
15986 | // t is exported | ||
15987 | // f is exported | ||
15988 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
15989 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
15990 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
15991 | var_virtual0 == var_t; | ||
15992 | } | ||
15993 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
15994 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
15995 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15996 | var_region) | ||
15997 | { | ||
15998 | find interpretation(problem,interpretation); | ||
15999 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16000 | // region is exported | ||
16001 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
16002 | } | ||
16003 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
16004 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16005 | var_region) | ||
16006 | { | ||
16007 | find interpretation(problem,interpretation); | ||
16008 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
16009 | // region is exported | ||
16010 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
16011 | } | ||
16012 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
16013 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16014 | var_region) | ||
16015 | { | ||
16016 | find interpretation(problem,interpretation); | ||
16017 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16018 | // region is exported | ||
16019 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
16020 | } | ||
16021 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
16022 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
16023 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16024 | var_region, var_state) | ||
16025 | { | ||
16026 | find interpretation(problem,interpretation); | ||
16027 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16028 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
16029 | // region is exported | ||
16030 | // state is exported | ||
16031 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16032 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
16033 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16034 | var_virtual0 == var_state; | ||
16035 | } | ||
16036 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
16037 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16038 | var_region, var_state) | ||
16039 | { | ||
16040 | find interpretation(problem,interpretation); | ||
16041 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
16042 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
16043 | // region is exported | ||
16044 | // state is exported | ||
16045 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
16046 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
16047 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16048 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
16049 | } | ||
16050 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
16051 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16052 | var_region, var_state) | ||
16053 | { | ||
16054 | find interpretation(problem,interpretation); | ||
16055 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16056 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
16057 | // region is exported | ||
16058 | // state is exported | ||
16059 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16060 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
16061 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16062 | var_virtual0 == var_state; | ||
16063 | } | ||
16064 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
16065 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
16066 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16067 | var_c) | ||
16068 | { | ||
16069 | find interpretation(problem,interpretation); | ||
16070 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16071 | // c is exported | ||
16072 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
16073 | } | ||
16074 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
16075 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16076 | var_c) | ||
16077 | { | ||
16078 | find interpretation(problem,interpretation); | ||
16079 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
16080 | // c is exported | ||
16081 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
16082 | } | ||
16083 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
16084 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16085 | var_c) | ||
16086 | { | ||
16087 | find interpretation(problem,interpretation); | ||
16088 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16089 | // c is exported | ||
16090 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
16091 | } | ||
16092 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
16093 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
16094 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16095 | var_c) | ||
16096 | { | ||
16097 | find interpretation(problem,interpretation); | ||
16098 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16099 | // c is exported | ||
16100 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
16101 | } | ||
16102 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
16103 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16104 | var_c) | ||
16105 | { | ||
16106 | find interpretation(problem,interpretation); | ||
16107 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
16108 | // c is exported | ||
16109 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
16110 | } | ||
16111 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
16112 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16113 | var_c) | ||
16114 | { | ||
16115 | find interpretation(problem,interpretation); | ||
16116 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16117 | // c is exported | ||
16118 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
16119 | } | ||
16120 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
16121 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
16122 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16123 | var_s) | ||
16124 | { | ||
16125 | find interpretation(problem,interpretation); | ||
16126 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16127 | // s is exported | ||
16128 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
16129 | } | ||
16130 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
16131 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16132 | var_s) | ||
16133 | { | ||
16134 | find interpretation(problem,interpretation); | ||
16135 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16136 | // s is exported | ||
16137 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
16138 | } | ||
16139 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
16140 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16141 | var_s) | ||
16142 | { | ||
16143 | find interpretation(problem,interpretation); | ||
16144 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16145 | // s is exported | ||
16146 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
16147 | } | ||
16148 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
16149 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
16150 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16151 | var_s) | ||
16152 | { | ||
16153 | find interpretation(problem,interpretation); | ||
16154 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16155 | // s is exported | ||
16156 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
16157 | } | ||
16158 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
16159 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16160 | var_s) | ||
16161 | { | ||
16162 | find interpretation(problem,interpretation); | ||
16163 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16164 | // s is exported | ||
16165 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
16166 | } | ||
16167 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
16168 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16169 | var_s) | ||
16170 | { | ||
16171 | find interpretation(problem,interpretation); | ||
16172 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16173 | // s is exported | ||
16174 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
16175 | } | ||
16176 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
16177 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
16178 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16179 | var_s, var_v1, var_v2) | ||
16180 | { | ||
16181 | find interpretation(problem,interpretation); | ||
16182 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16183 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16184 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16185 | // s is exported | ||
16186 | // v1 is exported | ||
16187 | // v2 is exported | ||
16188 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
16189 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
16190 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
16191 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16192 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16193 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16194 | var_virtual0 == var_v1; | ||
16195 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16196 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16197 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16198 | var_virtual1 == var_v2; | ||
16199 | }or{ | ||
16200 | find interpretation(problem,interpretation); | ||
16201 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16202 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16203 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16204 | // s is exported | ||
16205 | // v1 is exported | ||
16206 | // v2 is exported | ||
16207 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
16208 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
16209 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
16210 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16211 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16212 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16213 | var_virtual0 == var_v1; | ||
16214 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16215 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16216 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16217 | var_virtual1 == var_v2; | ||
16218 | } | ||
16219 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
16220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16221 | var_s, var_v1, var_v2) | ||
16222 | { | ||
16223 | find interpretation(problem,interpretation); | ||
16224 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16225 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16226 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16227 | // s is exported | ||
16228 | // v1 is exported | ||
16229 | // v2 is exported | ||
16230 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
16231 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
16232 | var_t1 != var_t2; | ||
16233 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16234 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16235 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16236 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
16237 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16238 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16239 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16240 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
16241 | }or{ | ||
16242 | find interpretation(problem,interpretation); | ||
16243 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16244 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16245 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16246 | // s is exported | ||
16247 | // v1 is exported | ||
16248 | // v2 is exported | ||
16249 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
16250 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
16251 | var_t1 != var_t2; | ||
16252 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16253 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16254 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16255 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
16256 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16257 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16258 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16259 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
16260 | } | ||
16261 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
16262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16263 | var_s, var_v1, var_v2) | ||
16264 | { | ||
16265 | find interpretation(problem,interpretation); | ||
16266 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16267 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16268 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16269 | // s is exported | ||
16270 | // v1 is exported | ||
16271 | // v2 is exported | ||
16272 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
16273 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
16274 | var_t1 != var_t2; | ||
16275 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16276 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16277 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16278 | var_virtual0 == var_v1; | ||
16279 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16280 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16281 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16282 | var_virtual1 == var_v2; | ||
16283 | }or{ | ||
16284 | find interpretation(problem,interpretation); | ||
16285 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16286 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16287 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16288 | // s is exported | ||
16289 | // v1 is exported | ||
16290 | // v2 is exported | ||
16291 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
16292 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
16293 | var_t1 != var_t2; | ||
16294 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16295 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16296 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16297 | var_virtual0 == var_v1; | ||
16298 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16299 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16300 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16301 | var_virtual1 == var_v2; | ||
16302 | } | ||
16303 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
16304 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
16305 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16306 | var_s) | ||
16307 | { | ||
16308 | find interpretation(problem,interpretation); | ||
16309 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16310 | // s is exported | ||
16311 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
16312 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
16313 | } | ||
16314 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
16315 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16316 | var_s) | ||
16317 | { | ||
16318 | find interpretation(problem,interpretation); | ||
16319 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16320 | // s is exported | ||
16321 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
16322 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
16323 | } | ||
16324 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
16325 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16326 | var_s) | ||
16327 | { | ||
16328 | find interpretation(problem,interpretation); | ||
16329 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16330 | // s is exported | ||
16331 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
16332 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
16333 | } | ||
16334 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
16335 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
16336 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16337 | var_v) | ||
16338 | { | ||
16339 | find interpretation(problem,interpretation); | ||
16340 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16341 | // v is exported | ||
16342 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
16343 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
16344 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
16345 | } | ||
16346 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
16347 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16348 | var_v) | ||
16349 | { | ||
16350 | find interpretation(problem,interpretation); | ||
16351 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16352 | // v is exported | ||
16353 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
16354 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
16355 | var_trg1 != var_trg2; | ||
16356 | } | ||
16357 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
16358 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16359 | var_v) | ||
16360 | { | ||
16361 | find interpretation(problem,interpretation); | ||
16362 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16363 | // v is exported | ||
16364 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
16365 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
16366 | var_trg1 != var_trg2; | ||
16367 | } | ||
16368 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
16369 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
16370 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16371 | var_v) | ||
16372 | { | ||
16373 | find interpretation(problem,interpretation); | ||
16374 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16375 | // v is exported | ||
16376 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
16377 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
16378 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
16379 | } | ||
16380 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
16381 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16382 | var_v) | ||
16383 | { | ||
16384 | find interpretation(problem,interpretation); | ||
16385 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16386 | // v is exported | ||
16387 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
16388 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
16389 | var_src1 != var_src2; | ||
16390 | } | ||
16391 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
16392 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16393 | var_v) | ||
16394 | { | ||
16395 | find interpretation(problem,interpretation); | ||
16396 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16397 | // v is exported | ||
16398 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
16399 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
16400 | var_src1 != var_src2; | ||
16401 | } | ||
16402 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
16403 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
16404 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16405 | var_s, var_v1, var_v2) | ||
16406 | { | ||
16407 | find interpretation(problem,interpretation); | ||
16408 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16409 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16410 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16411 | // s is exported | ||
16412 | // v1 is exported | ||
16413 | // v2 is exported | ||
16414 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
16415 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
16416 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16417 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16418 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16419 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16420 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16421 | var_virtual1 == var_v1; | ||
16422 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16423 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16424 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16425 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16426 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16427 | var_virtual3 == var_v2; | ||
16428 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
16429 | }or{ | ||
16430 | find interpretation(problem,interpretation); | ||
16431 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16432 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16433 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16434 | // s is exported | ||
16435 | // v1 is exported | ||
16436 | // v2 is exported | ||
16437 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
16438 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
16439 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16440 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16441 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16442 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16443 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16444 | var_virtual1 == var_v1; | ||
16445 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16446 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16447 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16448 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16449 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16450 | var_virtual3 == var_v2; | ||
16451 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
16452 | } | ||
16453 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
16454 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16455 | var_s, var_v1, var_v2) | ||
16456 | { | ||
16457 | find interpretation(problem,interpretation); | ||
16458 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16459 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16460 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16461 | // s is exported | ||
16462 | // v1 is exported | ||
16463 | // v2 is exported | ||
16464 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
16465 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
16466 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16467 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16468 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16469 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16470 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16471 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
16472 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16473 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16474 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16475 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16476 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16477 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
16478 | var_r1 != var_r2; | ||
16479 | }or{ | ||
16480 | find interpretation(problem,interpretation); | ||
16481 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16482 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16483 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16484 | // s is exported | ||
16485 | // v1 is exported | ||
16486 | // v2 is exported | ||
16487 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
16488 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
16489 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16490 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16491 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16492 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16493 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16494 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
16495 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16496 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16497 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16498 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16499 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16500 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
16501 | var_r1 != var_r2; | ||
16502 | } | ||
16503 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
16504 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16505 | var_s, var_v1, var_v2) | ||
16506 | { | ||
16507 | find interpretation(problem,interpretation); | ||
16508 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16509 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16510 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16511 | // s is exported | ||
16512 | // v1 is exported | ||
16513 | // v2 is exported | ||
16514 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
16515 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
16516 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16517 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16518 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16519 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16520 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16521 | var_virtual1 == var_v1; | ||
16522 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16523 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16524 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16525 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16526 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16527 | var_virtual3 == var_v2; | ||
16528 | var_r1 != var_r2; | ||
16529 | }or{ | ||
16530 | find interpretation(problem,interpretation); | ||
16531 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16532 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16533 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16534 | // s is exported | ||
16535 | // v1 is exported | ||
16536 | // v2 is exported | ||
16537 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
16538 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
16539 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16540 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16541 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16542 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16543 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16544 | var_virtual1 == var_v1; | ||
16545 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16546 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16547 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16548 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16549 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16550 | var_virtual3 == var_v2; | ||
16551 | var_r1 != var_r2; | ||
16552 | } | ||
16553 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
16554 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
16555 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16556 | var_parent, var_child) | ||
16557 | { | ||
16558 | find interpretation(problem,interpretation); | ||
16559 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16560 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
16561 | // parent is exported | ||
16562 | // child is exported | ||
16563 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16564 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
16565 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16566 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16567 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16568 | var_virtual1 == var_child; | ||
16569 | } | ||
16570 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
16571 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16572 | var_parent, var_child) | ||
16573 | { | ||
16574 | find interpretation(problem,interpretation); | ||
16575 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16576 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
16577 | // parent is exported | ||
16578 | // child is exported | ||
16579 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16580 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
16581 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16582 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16583 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16584 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
16585 | } | ||
16586 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
16587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16588 | var_parent, var_child) | ||
16589 | { | ||
16590 | find interpretation(problem,interpretation); | ||
16591 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16592 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
16593 | // parent is exported | ||
16594 | // child is exported | ||
16595 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16596 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
16597 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16598 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16599 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16600 | var_virtual1 == var_child; | ||
16601 | } | ||
16602 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
16603 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
16604 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16605 | var_s, var_v) | ||
16606 | { | ||
16607 | find interpretation(problem,interpretation); | ||
16608 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16609 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16610 | // s is exported | ||
16611 | // v is exported | ||
16612 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
16613 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16614 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16615 | }or{ | ||
16616 | find interpretation(problem,interpretation); | ||
16617 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16618 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16619 | // s is exported | ||
16620 | // v is exported | ||
16621 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
16622 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16623 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16624 | } | ||
16625 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
16626 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16627 | var_s, var_v) | ||
16628 | { | ||
16629 | find interpretation(problem,interpretation); | ||
16630 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16631 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
16632 | // s is exported | ||
16633 | // v is exported | ||
16634 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
16635 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16636 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16637 | }or{ | ||
16638 | find interpretation(problem,interpretation); | ||
16639 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16640 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
16641 | // s is exported | ||
16642 | // v is exported | ||
16643 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
16644 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16645 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16646 | } | ||
16647 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
16648 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16649 | var_s, var_v) | ||
16650 | { | ||
16651 | find interpretation(problem,interpretation); | ||
16652 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16653 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16654 | // s is exported | ||
16655 | // v is exported | ||
16656 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
16657 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16658 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16659 | }or{ | ||
16660 | find interpretation(problem,interpretation); | ||
16661 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16662 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16663 | // s is exported | ||
16664 | // v is exported | ||
16665 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
16666 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16667 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16668 | } | ||
16669 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
16670 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
16671 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16672 | var_composite) | ||
16673 | { | ||
16674 | find interpretation(problem,interpretation); | ||
16675 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16676 | // composite is exported | ||
16677 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16678 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
16679 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16680 | var_virtual0 == var_region1; | ||
16681 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16682 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
16683 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
16684 | var_virtual1 == var_region2; | ||
16685 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
16686 | } | ||
16687 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
16688 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16689 | var_composite) | ||
16690 | { | ||
16691 | find interpretation(problem,interpretation); | ||
16692 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16693 | // composite is exported | ||
16694 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16695 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
16696 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16697 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
16698 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16699 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
16700 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
16701 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
16702 | var_region1 != var_region2; | ||
16703 | } | ||
16704 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
16705 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16706 | var_composite) | ||
16707 | { | ||
16708 | find interpretation(problem,interpretation); | ||
16709 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16710 | // composite is exported | ||
16711 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16712 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
16713 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16714 | var_virtual0 == var_region1; | ||
16715 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16716 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
16717 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
16718 | var_virtual1 == var_region2; | ||
16719 | var_region1 != var_region2; | ||
16720 | } | ||
16721 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
16722 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
16723 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16724 | var_s) | ||
16725 | { | ||
16726 | find interpretation(problem,interpretation); | ||
16727 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16728 | // s is exported | ||
16729 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16730 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
16731 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16732 | var_virtual0 == var_s; | ||
16733 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16734 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
16735 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16736 | var_virtual1 == var_s; | ||
16737 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
16738 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
16739 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
16740 | var_virtual2 == var_s; | ||
16741 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
16742 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
16743 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
16744 | }or{ | ||
16745 | find interpretation(problem,interpretation); | ||
16746 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16747 | // s is exported | ||
16748 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16749 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
16750 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16751 | var_virtual0 == var_s; | ||
16752 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16753 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
16754 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16755 | var_virtual1 == var_s; | ||
16756 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
16757 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
16758 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
16759 | var_virtual2 == var_s; | ||
16760 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
16761 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
16762 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
16763 | } | ||
16764 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
16765 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16766 | var_s) | ||
16767 | { | ||
16768 | find interpretation(problem,interpretation); | ||
16769 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16770 | // s is exported | ||
16771 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16772 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
16773 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16774 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
16775 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16776 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
16777 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16778 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
16779 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
16780 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
16781 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
16782 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
16783 | var_t1 != var_t2; | ||
16784 | var_t2 != var_t3; | ||
16785 | var_t1 != var_t3; | ||
16786 | }or{ | ||
16787 | find interpretation(problem,interpretation); | ||
16788 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16789 | // s is exported | ||
16790 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16791 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
16792 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16793 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
16794 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16795 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
16796 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16797 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
16798 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
16799 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
16800 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
16801 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
16802 | var_t1 != var_t2; | ||
16803 | var_t2 != var_t3; | ||
16804 | var_t1 != var_t3; | ||
16805 | } | ||
16806 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
16807 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16808 | var_s) | ||
16809 | { | ||
16810 | find interpretation(problem,interpretation); | ||
16811 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16812 | // s is exported | ||
16813 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16814 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
16815 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16816 | var_virtual0 == var_s; | ||
16817 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16818 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
16819 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16820 | var_virtual1 == var_s; | ||
16821 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
16822 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
16823 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
16824 | var_virtual2 == var_s; | ||
16825 | var_t1 != var_t2; | ||
16826 | var_t2 != var_t3; | ||
16827 | var_t1 != var_t3; | ||
16828 | }or{ | ||
16829 | find interpretation(problem,interpretation); | ||
16830 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16831 | // s is exported | ||
16832 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16833 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
16834 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16835 | var_virtual0 == var_s; | ||
16836 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16837 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
16838 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16839 | var_virtual1 == var_s; | ||
16840 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
16841 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
16842 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
16843 | var_virtual2 == var_s; | ||
16844 | var_t1 != var_t2; | ||
16845 | var_t2 != var_t3; | ||
16846 | var_t1 != var_t3; | ||
16847 | } | ||
16848 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
16849 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
16850 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16851 | var_s1, var_s2) | ||
16852 | { | ||
16853 | find interpretation(problem,interpretation); | ||
16854 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
16855 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
16856 | // s1 is exported | ||
16857 | // s2 is exported | ||
16858 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
16859 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
16860 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
16861 | } | ||
16862 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
16863 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16864 | var_s1, var_s2) | ||
16865 | { | ||
16866 | find interpretation(problem,interpretation); | ||
16867 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
16868 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
16869 | // s1 is exported | ||
16870 | // s2 is exported | ||
16871 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
16872 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
16873 | var_s1 != var_s2; | ||
16874 | } | ||
16875 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
16876 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16877 | var_s1, var_s2) | ||
16878 | { | ||
16879 | find interpretation(problem,interpretation); | ||
16880 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
16881 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
16882 | // s1 is exported | ||
16883 | // s2 is exported | ||
16884 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
16885 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
16886 | var_s1 != var_s2; | ||
16887 | } | ||
16888 | |||
16889 | ////////// | ||
16890 | // 1.4 Containment Indexer | ||
16891 | ////////// | ||
16892 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
16893 | find mustContains4(_,_,source,target); | ||
16894 | } | ||
16895 | |||
16896 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16897 | source: DefinedElement, target: DefinedElement) | ||
16898 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
16899 | |||
16900 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
16901 | |||
16902 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
16903 | |||
16904 | private pattern mustTransitiveContains(source,target) { | ||
16905 | find mustContains2+(source,target); | ||
16906 | } | ||
16907 | |||
16908 | ////////// | ||
16909 | // 2. Invalidation Indexers | ||
16910 | ////////// | ||
16911 | // 2.1 Invalidated by WF Queries | ||
16912 | ////////// | ||
16913 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16914 | var_r1) | ||
16915 | { | ||
16916 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
16917 | } | ||
16918 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16919 | var_r) | ||
16920 | { | ||
16921 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
16922 | } | ||
16923 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16924 | var_t, var_e) | ||
16925 | { | ||
16926 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
16927 | } | ||
16928 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16929 | var_e) | ||
16930 | { | ||
16931 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
16932 | } | ||
16933 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16934 | var_e, var_t1, var_t2) | ||
16935 | { | ||
16936 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
16937 | } | ||
16938 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16939 | var_t, var_e) | ||
16940 | { | ||
16941 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
16942 | } | ||
16943 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16944 | var_t, var_f) | ||
16945 | { | ||
16946 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
16947 | } | ||
16948 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16949 | var_region) | ||
16950 | { | ||
16951 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
16952 | } | ||
16953 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16954 | var_c) | ||
16955 | { | ||
16956 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
16957 | } | ||
16958 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16959 | var_c) | ||
16960 | { | ||
16961 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
16962 | } | ||
16963 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16964 | var_s) | ||
16965 | { | ||
16966 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
16967 | } | ||
16968 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16969 | var_s) | ||
16970 | { | ||
16971 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
16972 | } | ||
16973 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16974 | var_s, var_v1, var_v2) | ||
16975 | { | ||
16976 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
16977 | } | ||
16978 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16979 | var_s) | ||
16980 | { | ||
16981 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
16982 | } | ||
16983 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16984 | var_s, var_v1, var_v2) | ||
16985 | { | ||
16986 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
16987 | } | ||
16988 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16989 | var_s, var_v) | ||
16990 | { | ||
16991 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
16992 | } | ||
16993 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16994 | var_s) | ||
16995 | { | ||
16996 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
16997 | } | ||
16998 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
16999 | var_s1, var_s2) | ||
17000 | { | ||
17001 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
17002 | } | ||
17003 | |||
17004 | ////////// | ||
17005 | // 3. Unfinishedness Indexers | ||
17006 | ////////// | ||
17007 | // 3.1 Unfinishedness Measured by Multiplicity | ||
17008 | ////////// | ||
17009 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
17010 | find interpretation(problem,interpretation); | ||
17011 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17012 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
17013 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
17014 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
17015 | check(numberOfExistingReferences < 1); | ||
17016 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
17017 | } | ||
17018 | |||
17019 | ////////// | ||
17020 | // 3.2 Unfinishedness Measured by WF Queries | ||
17021 | ////////// | ||
17022 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17023 | var_r1) | ||
17024 | { | ||
17025 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
17026 | } | ||
17027 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17028 | var_r) | ||
17029 | { | ||
17030 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
17031 | } | ||
17032 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17033 | var_t, var_e) | ||
17034 | { | ||
17035 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
17036 | } | ||
17037 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17038 | var_e) | ||
17039 | { | ||
17040 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
17041 | } | ||
17042 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17043 | var_e, var_t1, var_t2) | ||
17044 | { | ||
17045 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
17046 | } | ||
17047 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17048 | var_t, var_e) | ||
17049 | { | ||
17050 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
17051 | } | ||
17052 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17053 | var_t, var_f) | ||
17054 | { | ||
17055 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
17056 | } | ||
17057 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17058 | var_region) | ||
17059 | { | ||
17060 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
17061 | } | ||
17062 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17063 | var_c) | ||
17064 | { | ||
17065 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
17066 | } | ||
17067 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17068 | var_c) | ||
17069 | { | ||
17070 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
17071 | } | ||
17072 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17073 | var_s) | ||
17074 | { | ||
17075 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
17076 | } | ||
17077 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17078 | var_s) | ||
17079 | { | ||
17080 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
17081 | } | ||
17082 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17083 | var_s, var_v1, var_v2) | ||
17084 | { | ||
17085 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
17086 | } | ||
17087 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17088 | var_s) | ||
17089 | { | ||
17090 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
17091 | } | ||
17092 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17093 | var_s, var_v1, var_v2) | ||
17094 | { | ||
17095 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
17096 | } | ||
17097 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17098 | var_s, var_v) | ||
17099 | { | ||
17100 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
17101 | } | ||
17102 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17103 | var_s) | ||
17104 | { | ||
17105 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
17106 | } | ||
17107 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17108 | var_s1, var_s2) | ||
17109 | { | ||
17110 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
17111 | } | ||
17112 | |||
17113 | ////////// | ||
17114 | // 4. Refinement Indexers | ||
17115 | ////////// | ||
17116 | // 4.1 Object constructors | ||
17117 | ////////// | ||
17118 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
17119 | { | ||
17120 | find interpretation(problem,interpretation); | ||
17121 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
17122 | find mustExist(problem, interpretation, root); | ||
17123 | }or{ | ||
17124 | find interpretation(problem,interpretation); | ||
17125 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
17126 | find mustExist(problem, interpretation, root); | ||
17127 | }or{ | ||
17128 | find interpretation(problem,interpretation); | ||
17129 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
17130 | find mustExist(problem, interpretation, root); | ||
17131 | }or{ | ||
17132 | find interpretation(problem,interpretation); | ||
17133 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
17134 | find mustExist(problem, interpretation, root); | ||
17135 | }or{ | ||
17136 | find interpretation(problem,interpretation); | ||
17137 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
17138 | find mustExist(problem, interpretation, root); | ||
17139 | }or{ | ||
17140 | find interpretation(problem,interpretation); | ||
17141 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
17142 | find mustExist(problem, interpretation, root); | ||
17143 | }or{ | ||
17144 | find interpretation(problem,interpretation); | ||
17145 | find mustInstanceOfState_class(problem,interpretation,root); | ||
17146 | find mustExist(problem, interpretation, root); | ||
17147 | }or{ | ||
17148 | find interpretation(problem,interpretation); | ||
17149 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
17150 | find mustExist(problem, interpretation, root); | ||
17151 | }or{ | ||
17152 | find interpretation(problem,interpretation); | ||
17153 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
17154 | find mustExist(problem, interpretation, root); | ||
17155 | }or{ | ||
17156 | find interpretation(problem,interpretation); | ||
17157 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
17158 | find mustExist(problem, interpretation, root); | ||
17159 | }or{ | ||
17160 | find interpretation(problem,interpretation); | ||
17161 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
17162 | find mustExist(problem, interpretation, root); | ||
17163 | }or{ | ||
17164 | find interpretation(problem,interpretation); | ||
17165 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
17166 | find mustExist(problem, interpretation, root); | ||
17167 | }or{ | ||
17168 | find interpretation(problem,interpretation); | ||
17169 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
17170 | find mustExist(problem, interpretation, root); | ||
17171 | }or{ | ||
17172 | find interpretation(problem,interpretation); | ||
17173 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
17174 | find mustExist(problem, interpretation, root); | ||
17175 | }or{ | ||
17176 | find interpretation(problem,interpretation); | ||
17177 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
17178 | find mustExist(problem, interpretation, root); | ||
17179 | }or{ | ||
17180 | find interpretation(problem,interpretation); | ||
17181 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
17182 | find mustExist(problem, interpretation, root); | ||
17183 | }or{ | ||
17184 | find interpretation(problem,interpretation); | ||
17185 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
17186 | find mustExist(problem, interpretation, root); | ||
17187 | } | ||
17188 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
17189 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17190 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17191 | container:DefinedElement) | ||
17192 | { | ||
17193 | find interpretation(problem,interpretation); | ||
17194 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17195 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
17196 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17197 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17198 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17199 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
17200 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17201 | find mustExist(problem, interpretation, container); | ||
17202 | neg find mustExist(problem, interpretation, newObject); | ||
17203 | } | ||
17204 | pattern createObject_Exit_class( | ||
17205 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17206 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17207 | { | ||
17208 | find interpretation(problem,interpretation); | ||
17209 | neg find hasElementInContainment(problem,interpretation); | ||
17210 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17211 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
17212 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
17213 | find mayExist(problem, interpretation, newObject); | ||
17214 | neg find mustExist(problem, interpretation, newObject); | ||
17215 | } | ||
17216 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
17217 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17218 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17219 | container:DefinedElement) | ||
17220 | { | ||
17221 | find interpretation(problem,interpretation); | ||
17222 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17223 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
17224 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17225 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17226 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17227 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
17228 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17229 | find mustExist(problem, interpretation, container); | ||
17230 | neg find mustExist(problem, interpretation, newObject); | ||
17231 | } | ||
17232 | pattern createObject_Entry_class( | ||
17233 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17234 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17235 | { | ||
17236 | find interpretation(problem,interpretation); | ||
17237 | neg find hasElementInContainment(problem,interpretation); | ||
17238 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17239 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
17240 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
17241 | find mayExist(problem, interpretation, newObject); | ||
17242 | neg find mustExist(problem, interpretation, newObject); | ||
17243 | } | ||
17244 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
17245 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17246 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17247 | container:DefinedElement) | ||
17248 | { | ||
17249 | find interpretation(problem,interpretation); | ||
17250 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17251 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
17252 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17253 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17254 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17255 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
17256 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17257 | find mustExist(problem, interpretation, container); | ||
17258 | neg find mustExist(problem, interpretation, newObject); | ||
17259 | } | ||
17260 | pattern createObject_FinalState_class( | ||
17261 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17262 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17263 | { | ||
17264 | find interpretation(problem,interpretation); | ||
17265 | neg find hasElementInContainment(problem,interpretation); | ||
17266 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17267 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
17268 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
17269 | find mayExist(problem, interpretation, newObject); | ||
17270 | neg find mustExist(problem, interpretation, newObject); | ||
17271 | } | ||
17272 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
17273 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17274 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17275 | container:DefinedElement) | ||
17276 | { | ||
17277 | find interpretation(problem,interpretation); | ||
17278 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17279 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
17280 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17281 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17282 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17283 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
17284 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17285 | find mustExist(problem, interpretation, container); | ||
17286 | neg find mustExist(problem, interpretation, newObject); | ||
17287 | } | ||
17288 | pattern createObject_Choice_class( | ||
17289 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17290 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17291 | { | ||
17292 | find interpretation(problem,interpretation); | ||
17293 | neg find hasElementInContainment(problem,interpretation); | ||
17294 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17295 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
17296 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
17297 | find mayExist(problem, interpretation, newObject); | ||
17298 | neg find mustExist(problem, interpretation, newObject); | ||
17299 | } | ||
17300 | pattern createObject_Statechart_class_UndefinedPart( | ||
17301 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17302 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17303 | { | ||
17304 | find interpretation(problem,interpretation); | ||
17305 | neg find hasElementInContainment(problem,interpretation); | ||
17306 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17307 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
17308 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
17309 | find mayExist(problem, interpretation, newObject); | ||
17310 | neg find mustExist(problem, interpretation, newObject); | ||
17311 | } | ||
17312 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
17313 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17314 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17315 | container:DefinedElement) | ||
17316 | { | ||
17317 | find interpretation(problem,interpretation); | ||
17318 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17319 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
17320 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17321 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
17322 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
17323 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
17324 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
17325 | find mustExist(problem, interpretation, container); | ||
17326 | neg find mustExist(problem, interpretation, newObject); | ||
17327 | } | ||
17328 | pattern createObject_Region_class( | ||
17329 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17330 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17331 | { | ||
17332 | find interpretation(problem,interpretation); | ||
17333 | neg find hasElementInContainment(problem,interpretation); | ||
17334 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17335 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
17336 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
17337 | find mayExist(problem, interpretation, newObject); | ||
17338 | neg find mustExist(problem, interpretation, newObject); | ||
17339 | } | ||
17340 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
17341 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17342 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17343 | container:DefinedElement) | ||
17344 | { | ||
17345 | find interpretation(problem,interpretation); | ||
17346 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17347 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
17348 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17349 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
17350 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17351 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
17352 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
17353 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
17354 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
17355 | find mustExist(problem, interpretation, container); | ||
17356 | neg find mustExist(problem, interpretation, newObject); | ||
17357 | } | ||
17358 | pattern createObject_Transition_class( | ||
17359 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17360 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17361 | { | ||
17362 | find interpretation(problem,interpretation); | ||
17363 | neg find hasElementInContainment(problem,interpretation); | ||
17364 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17365 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
17366 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
17367 | find mayExist(problem, interpretation, newObject); | ||
17368 | neg find mustExist(problem, interpretation, newObject); | ||
17369 | } | ||
17370 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
17371 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17372 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17373 | container:DefinedElement) | ||
17374 | { | ||
17375 | find interpretation(problem,interpretation); | ||
17376 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17377 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
17378 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17379 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17380 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17381 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
17382 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17383 | find mustExist(problem, interpretation, container); | ||
17384 | neg find mustExist(problem, interpretation, newObject); | ||
17385 | } | ||
17386 | pattern createObject_Synchronization_class( | ||
17387 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17388 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17389 | { | ||
17390 | find interpretation(problem,interpretation); | ||
17391 | neg find hasElementInContainment(problem,interpretation); | ||
17392 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17393 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
17394 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
17395 | find mayExist(problem, interpretation, newObject); | ||
17396 | neg find mustExist(problem, interpretation, newObject); | ||
17397 | } | ||
17398 | pattern createObject_State_class_by_vertices_reference_Region( | ||
17399 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17400 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17401 | container:DefinedElement) | ||
17402 | { | ||
17403 | find interpretation(problem,interpretation); | ||
17404 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17405 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
17406 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17407 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17408 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17409 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
17410 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17411 | find mustExist(problem, interpretation, container); | ||
17412 | neg find mustExist(problem, interpretation, newObject); | ||
17413 | } | ||
17414 | pattern createObject_State_class( | ||
17415 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17416 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17417 | { | ||
17418 | find interpretation(problem,interpretation); | ||
17419 | neg find hasElementInContainment(problem,interpretation); | ||
17420 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17421 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
17422 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
17423 | find mayExist(problem, interpretation, newObject); | ||
17424 | neg find mustExist(problem, interpretation, newObject); | ||
17425 | } | ||
17426 | |||
17427 | ////////// | ||
17428 | // 4.2 Type refinement | ||
17429 | ////////// | ||
17430 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17431 | find interpretation(problem,interpretation); | ||
17432 | PartialInterpretation.newElements(interpretation,element); | ||
17433 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
17434 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17435 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17436 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17437 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17438 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17439 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17440 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17441 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17442 | } | ||
17443 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17444 | find interpretation(problem,interpretation); | ||
17445 | PartialInterpretation.newElements(interpretation,element); | ||
17446 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
17447 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17448 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17449 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17450 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17451 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17452 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17453 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17454 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17455 | } | ||
17456 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17457 | find interpretation(problem,interpretation); | ||
17458 | PartialInterpretation.newElements(interpretation,element); | ||
17459 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
17460 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
17461 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17462 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17463 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17464 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17465 | } | ||
17466 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17467 | find interpretation(problem,interpretation); | ||
17468 | PartialInterpretation.newElements(interpretation,element); | ||
17469 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
17470 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17471 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17472 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17473 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17474 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17475 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17476 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17477 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17478 | } | ||
17479 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17480 | find interpretation(problem,interpretation); | ||
17481 | PartialInterpretation.newElements(interpretation,element); | ||
17482 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
17483 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17484 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
17485 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17486 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17487 | } | ||
17488 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17489 | find interpretation(problem,interpretation); | ||
17490 | PartialInterpretation.newElements(interpretation,element); | ||
17491 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
17492 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17493 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17494 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17495 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17496 | } | ||
17497 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17498 | find interpretation(problem,interpretation); | ||
17499 | PartialInterpretation.newElements(interpretation,element); | ||
17500 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
17501 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17502 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17503 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17504 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17505 | } | ||
17506 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17507 | find interpretation(problem,interpretation); | ||
17508 | PartialInterpretation.newElements(interpretation,element); | ||
17509 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
17510 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17511 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17512 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17513 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17514 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17515 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17516 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17517 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17518 | } | ||
17519 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17520 | find interpretation(problem,interpretation); | ||
17521 | PartialInterpretation.newElements(interpretation,element); | ||
17522 | find mayInstanceOfState_class(problem,interpretation,element); | ||
17523 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
17524 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
17525 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17526 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17527 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17528 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
17529 | } | ||
17530 | |||
17531 | ////////// | ||
17532 | // 4.3 Relation refinement | ||
17533 | ////////// | ||
17534 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
17535 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17536 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
17537 | from: DefinedElement, to: DefinedElement) | ||
17538 | { | ||
17539 | find interpretation(problem,interpretation); | ||
17540 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17541 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
17542 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
17543 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
17544 | find mustExist(problem, interpretation, from); | ||
17545 | find mustExist(problem, interpretation, to); | ||
17546 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
17547 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
17548 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
17549 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
17550 | } | ||
17551 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
17552 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
17553 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
17554 | |||
17555 | ////////// | ||
17556 | // 0. Util | ||
17557 | ////////// | ||
17558 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17559 | PartialInterpretation.problem(interpretation,problem); | ||
17560 | } | ||
17561 | |||
17562 | ///////////////////////// | ||
17563 | // 0.1 Existence | ||
17564 | ///////////////////////// | ||
17565 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17566 | find interpretation(problem,interpretation); | ||
17567 | LogicProblem.elements(problem,element); | ||
17568 | } or { | ||
17569 | find interpretation(problem,interpretation); | ||
17570 | PartialInterpretation.newElements(interpretation,element); | ||
17571 | } | ||
17572 | |||
17573 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17574 | find mustExist(problem,interpretation,element); | ||
17575 | } or { | ||
17576 | find interpretation(problem,interpretation); | ||
17577 | neg find elementCloseWorld(element); | ||
17578 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17579 | } | ||
17580 | |||
17581 | private pattern elementCloseWorld(element:DefinedElement) { | ||
17582 | PartialInterpretation.openWorldElements(i,element); | ||
17583 | PartialInterpretation.maxNewElements(i,0); | ||
17584 | } or { | ||
17585 | Scope.targetTypeInterpretation(scope,interpretation); | ||
17586 | PartialTypeInterpratation.elements(interpretation,element); | ||
17587 | Scope.maxNewElements(scope,0); | ||
17588 | } | ||
17589 | |||
17590 | //////////////////////// | ||
17591 | // 0.2 Equivalence | ||
17592 | //////////////////////// | ||
17593 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
17594 | find mayExist(problem,interpretation,a); | ||
17595 | find mayExist(problem,interpretation,b); | ||
17596 | a == b; | ||
17597 | } | ||
17598 | |||
17599 | //////////////////////// | ||
17600 | // 0.3 Required Patterns by TypeIndexer | ||
17601 | //////////////////////// | ||
17602 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
17603 | find interpretation(problem,interpretation); | ||
17604 | LogicProblem.types(problem,type); | ||
17605 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17606 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17607 | } | ||
17608 | |||
17609 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
17610 | find interpretation(problem,interpretation); | ||
17611 | LogicProblem.types(problem,type); | ||
17612 | TypeDefinition.elements(type,element); | ||
17613 | } or { | ||
17614 | find interpretation(problem,interpretation); | ||
17615 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
17616 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
17617 | } | ||
17618 | |||
17619 | private pattern isPrimitive(element: PrimitiveElement) { | ||
17620 | PrimitiveElement(element); | ||
17621 | } | ||
17622 | |||
17623 | ////////// | ||
17624 | // 1. Problem-Specific Base Indexers | ||
17625 | ////////// | ||
17626 | // 1.1 Type Indexers | ||
17627 | ////////// | ||
17628 | // 1.1.1 primitive Type Indexers | ||
17629 | ////////// | ||
17630 | |||
17631 | ////////// | ||
17632 | // 1.1.2 domain-specific Type Indexers | ||
17633 | ////////// | ||
17634 | /** | ||
17635 | * An element must be an instance of type "Pseudostate class". | ||
17636 | */ | ||
17637 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17638 | Type.name(type,"Pseudostate class"); | ||
17639 | find directInstanceOf(problem,interpretation,element,type); | ||
17640 | } | ||
17641 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17642 | find interpretation(problem,interpretation); | ||
17643 | PartialInterpretation.scopes(interpretation,scope); | ||
17644 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17645 | Scope.maxNewElements(scope,0); | ||
17646 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17647 | Type.name(type,"Pseudostate class"); | ||
17648 | } | ||
17649 | |||
17650 | /** | ||
17651 | * An element may be an instance of type "Pseudostate class". | ||
17652 | */ | ||
17653 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17654 | { | ||
17655 | find interpretation(problem,interpretation); | ||
17656 | PartialInterpretation.newElements(interpretation,element); | ||
17657 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17658 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17659 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17660 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17661 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17662 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17663 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17664 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17665 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
17666 | neg find isPrimitive(element); | ||
17667 | } or { | ||
17668 | find interpretation(problem,interpretation); | ||
17669 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17670 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17671 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17672 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17673 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17674 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17675 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17676 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17677 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17678 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
17679 | neg find isPrimitive(element); | ||
17680 | } or | ||
17681 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
17682 | /** | ||
17683 | * An element must be an instance of type "Vertex class". | ||
17684 | */ | ||
17685 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17686 | Type.name(type,"Vertex class"); | ||
17687 | find directInstanceOf(problem,interpretation,element,type); | ||
17688 | } | ||
17689 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17690 | find interpretation(problem,interpretation); | ||
17691 | PartialInterpretation.scopes(interpretation,scope); | ||
17692 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17693 | Scope.maxNewElements(scope,0); | ||
17694 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17695 | Type.name(type,"Vertex class"); | ||
17696 | } | ||
17697 | |||
17698 | /** | ||
17699 | * An element may be an instance of type "Vertex class". | ||
17700 | */ | ||
17701 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17702 | { | ||
17703 | find interpretation(problem,interpretation); | ||
17704 | PartialInterpretation.newElements(interpretation,element); | ||
17705 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17706 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17707 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17708 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17709 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17710 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
17711 | neg find isPrimitive(element); | ||
17712 | } or { | ||
17713 | find interpretation(problem,interpretation); | ||
17714 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17715 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17716 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17717 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17718 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17719 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17720 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
17721 | neg find isPrimitive(element); | ||
17722 | } or | ||
17723 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
17724 | /** | ||
17725 | * An element must be an instance of type "Region class". | ||
17726 | */ | ||
17727 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17728 | Type.name(type,"Region class"); | ||
17729 | find directInstanceOf(problem,interpretation,element,type); | ||
17730 | } | ||
17731 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17732 | find interpretation(problem,interpretation); | ||
17733 | PartialInterpretation.scopes(interpretation,scope); | ||
17734 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17735 | Scope.maxNewElements(scope,0); | ||
17736 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17737 | Type.name(type,"Region class"); | ||
17738 | } | ||
17739 | |||
17740 | /** | ||
17741 | * An element may be an instance of type "Region class". | ||
17742 | */ | ||
17743 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17744 | { | ||
17745 | find interpretation(problem,interpretation); | ||
17746 | PartialInterpretation.newElements(interpretation,element); | ||
17747 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17748 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17749 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17750 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
17751 | neg find isPrimitive(element); | ||
17752 | } or { | ||
17753 | find interpretation(problem,interpretation); | ||
17754 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17755 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17756 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17757 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17758 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
17759 | neg find isPrimitive(element); | ||
17760 | } or | ||
17761 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
17762 | /** | ||
17763 | * An element must be an instance of type "Transition class". | ||
17764 | */ | ||
17765 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17766 | Type.name(type,"Transition class"); | ||
17767 | find directInstanceOf(problem,interpretation,element,type); | ||
17768 | } | ||
17769 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17770 | find interpretation(problem,interpretation); | ||
17771 | PartialInterpretation.scopes(interpretation,scope); | ||
17772 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17773 | Scope.maxNewElements(scope,0); | ||
17774 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17775 | Type.name(type,"Transition class"); | ||
17776 | } | ||
17777 | |||
17778 | /** | ||
17779 | * An element may be an instance of type "Transition class". | ||
17780 | */ | ||
17781 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17782 | { | ||
17783 | find interpretation(problem,interpretation); | ||
17784 | PartialInterpretation.newElements(interpretation,element); | ||
17785 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17786 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17787 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17788 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
17789 | neg find isPrimitive(element); | ||
17790 | } or { | ||
17791 | find interpretation(problem,interpretation); | ||
17792 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17793 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17794 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17795 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17796 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
17797 | neg find isPrimitive(element); | ||
17798 | } or | ||
17799 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
17800 | /** | ||
17801 | * An element must be an instance of type "Statechart class". | ||
17802 | */ | ||
17803 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17804 | Type.name(type,"Statechart class"); | ||
17805 | find directInstanceOf(problem,interpretation,element,type); | ||
17806 | } | ||
17807 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17808 | find interpretation(problem,interpretation); | ||
17809 | PartialInterpretation.scopes(interpretation,scope); | ||
17810 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17811 | Scope.maxNewElements(scope,0); | ||
17812 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17813 | Type.name(type,"Statechart class"); | ||
17814 | } | ||
17815 | |||
17816 | /** | ||
17817 | * An element may be an instance of type "Statechart class". | ||
17818 | */ | ||
17819 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17820 | { | ||
17821 | find interpretation(problem,interpretation); | ||
17822 | PartialInterpretation.newElements(interpretation,element); | ||
17823 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17824 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17825 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
17826 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17827 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
17828 | neg find isPrimitive(element); | ||
17829 | } or { | ||
17830 | find interpretation(problem,interpretation); | ||
17831 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17832 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17833 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17834 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
17835 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17836 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
17837 | neg find isPrimitive(element); | ||
17838 | } or | ||
17839 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
17840 | /** | ||
17841 | * An element must be an instance of type "Entry class". | ||
17842 | */ | ||
17843 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17844 | Type.name(type,"Entry class"); | ||
17845 | find directInstanceOf(problem,interpretation,element,type); | ||
17846 | } | ||
17847 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17848 | find interpretation(problem,interpretation); | ||
17849 | PartialInterpretation.scopes(interpretation,scope); | ||
17850 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17851 | Scope.maxNewElements(scope,0); | ||
17852 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17853 | Type.name(type,"Entry class"); | ||
17854 | } | ||
17855 | |||
17856 | /** | ||
17857 | * An element may be an instance of type "Entry class". | ||
17858 | */ | ||
17859 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17860 | { | ||
17861 | find interpretation(problem,interpretation); | ||
17862 | PartialInterpretation.newElements(interpretation,element); | ||
17863 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17864 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17865 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17866 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17867 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17868 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17869 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17870 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
17871 | neg find isPrimitive(element); | ||
17872 | } or { | ||
17873 | find interpretation(problem,interpretation); | ||
17874 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17875 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17876 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17877 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17878 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17879 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17880 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17881 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17882 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
17883 | neg find isPrimitive(element); | ||
17884 | } or | ||
17885 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
17886 | /** | ||
17887 | * An element must be an instance of type "Synchronization class". | ||
17888 | */ | ||
17889 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17890 | Type.name(type,"Synchronization class"); | ||
17891 | find directInstanceOf(problem,interpretation,element,type); | ||
17892 | } | ||
17893 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17894 | find interpretation(problem,interpretation); | ||
17895 | PartialInterpretation.scopes(interpretation,scope); | ||
17896 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17897 | Scope.maxNewElements(scope,0); | ||
17898 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17899 | Type.name(type,"Synchronization class"); | ||
17900 | } | ||
17901 | |||
17902 | /** | ||
17903 | * An element may be an instance of type "Synchronization class". | ||
17904 | */ | ||
17905 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17906 | { | ||
17907 | find interpretation(problem,interpretation); | ||
17908 | PartialInterpretation.newElements(interpretation,element); | ||
17909 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17910 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17911 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17912 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17913 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17914 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17915 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17916 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
17917 | neg find isPrimitive(element); | ||
17918 | } or { | ||
17919 | find interpretation(problem,interpretation); | ||
17920 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17921 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17922 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17923 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17924 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17925 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17926 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17927 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17928 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
17929 | neg find isPrimitive(element); | ||
17930 | } or | ||
17931 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
17932 | /** | ||
17933 | * An element must be an instance of type "State class". | ||
17934 | */ | ||
17935 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17936 | Type.name(type,"State class"); | ||
17937 | find directInstanceOf(problem,interpretation,element,type); | ||
17938 | } | ||
17939 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17940 | find interpretation(problem,interpretation); | ||
17941 | PartialInterpretation.scopes(interpretation,scope); | ||
17942 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17943 | Scope.maxNewElements(scope,0); | ||
17944 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17945 | Type.name(type,"State class"); | ||
17946 | } | ||
17947 | |||
17948 | /** | ||
17949 | * An element may be an instance of type "State class". | ||
17950 | */ | ||
17951 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17952 | { | ||
17953 | find interpretation(problem,interpretation); | ||
17954 | PartialInterpretation.newElements(interpretation,element); | ||
17955 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17956 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
17957 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
17958 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17959 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17960 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
17961 | neg find isPrimitive(element); | ||
17962 | } or { | ||
17963 | find interpretation(problem,interpretation); | ||
17964 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17965 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17966 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
17967 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
17968 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17969 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17970 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
17971 | neg find isPrimitive(element); | ||
17972 | } or | ||
17973 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
17974 | /** | ||
17975 | * An element must be an instance of type "RegularState class". | ||
17976 | */ | ||
17977 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17978 | Type.name(type,"RegularState class"); | ||
17979 | find directInstanceOf(problem,interpretation,element,type); | ||
17980 | } | ||
17981 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17982 | find interpretation(problem,interpretation); | ||
17983 | PartialInterpretation.scopes(interpretation,scope); | ||
17984 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17985 | Scope.maxNewElements(scope,0); | ||
17986 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17987 | Type.name(type,"RegularState class"); | ||
17988 | } | ||
17989 | |||
17990 | /** | ||
17991 | * An element may be an instance of type "RegularState class". | ||
17992 | */ | ||
17993 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17994 | { | ||
17995 | find interpretation(problem,interpretation); | ||
17996 | PartialInterpretation.newElements(interpretation,element); | ||
17997 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17998 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17999 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
18000 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18001 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18002 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
18003 | neg find isPrimitive(element); | ||
18004 | } or { | ||
18005 | find interpretation(problem,interpretation); | ||
18006 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18007 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18008 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18009 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
18010 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18011 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18012 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
18013 | neg find isPrimitive(element); | ||
18014 | } or | ||
18015 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
18016 | /** | ||
18017 | * An element must be an instance of type "CompositeElement class". | ||
18018 | */ | ||
18019 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18020 | Type.name(type,"CompositeElement class"); | ||
18021 | find directInstanceOf(problem,interpretation,element,type); | ||
18022 | } | ||
18023 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18024 | find interpretation(problem,interpretation); | ||
18025 | PartialInterpretation.scopes(interpretation,scope); | ||
18026 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18027 | Scope.maxNewElements(scope,0); | ||
18028 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18029 | Type.name(type,"CompositeElement class"); | ||
18030 | } | ||
18031 | |||
18032 | /** | ||
18033 | * An element may be an instance of type "CompositeElement class". | ||
18034 | */ | ||
18035 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18036 | { | ||
18037 | find interpretation(problem,interpretation); | ||
18038 | PartialInterpretation.newElements(interpretation,element); | ||
18039 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18040 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18041 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18042 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
18043 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18044 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
18045 | neg find isPrimitive(element); | ||
18046 | } or { | ||
18047 | find interpretation(problem,interpretation); | ||
18048 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18049 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18050 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18051 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18052 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
18053 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18054 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
18055 | neg find isPrimitive(element); | ||
18056 | } or | ||
18057 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
18058 | /** | ||
18059 | * An element must be an instance of type "Choice class". | ||
18060 | */ | ||
18061 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18062 | Type.name(type,"Choice class"); | ||
18063 | find directInstanceOf(problem,interpretation,element,type); | ||
18064 | } | ||
18065 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18066 | find interpretation(problem,interpretation); | ||
18067 | PartialInterpretation.scopes(interpretation,scope); | ||
18068 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18069 | Scope.maxNewElements(scope,0); | ||
18070 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18071 | Type.name(type,"Choice class"); | ||
18072 | } | ||
18073 | |||
18074 | /** | ||
18075 | * An element may be an instance of type "Choice class". | ||
18076 | */ | ||
18077 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18078 | { | ||
18079 | find interpretation(problem,interpretation); | ||
18080 | PartialInterpretation.newElements(interpretation,element); | ||
18081 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18082 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18083 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18084 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18085 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18086 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18087 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18088 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
18089 | neg find isPrimitive(element); | ||
18090 | } or { | ||
18091 | find interpretation(problem,interpretation); | ||
18092 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18093 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18094 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18095 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18096 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18097 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18098 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18099 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18100 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
18101 | neg find isPrimitive(element); | ||
18102 | } or | ||
18103 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
18104 | /** | ||
18105 | * An element must be an instance of type "Exit class". | ||
18106 | */ | ||
18107 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18108 | Type.name(type,"Exit class"); | ||
18109 | find directInstanceOf(problem,interpretation,element,type); | ||
18110 | } | ||
18111 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18112 | find interpretation(problem,interpretation); | ||
18113 | PartialInterpretation.scopes(interpretation,scope); | ||
18114 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18115 | Scope.maxNewElements(scope,0); | ||
18116 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18117 | Type.name(type,"Exit class"); | ||
18118 | } | ||
18119 | |||
18120 | /** | ||
18121 | * An element may be an instance of type "Exit class". | ||
18122 | */ | ||
18123 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18124 | { | ||
18125 | find interpretation(problem,interpretation); | ||
18126 | PartialInterpretation.newElements(interpretation,element); | ||
18127 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18128 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18129 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18130 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18131 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18132 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18133 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18134 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
18135 | neg find isPrimitive(element); | ||
18136 | } or { | ||
18137 | find interpretation(problem,interpretation); | ||
18138 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18139 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18140 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18141 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18142 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18143 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18144 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18145 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18146 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
18147 | neg find isPrimitive(element); | ||
18148 | } or | ||
18149 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
18150 | /** | ||
18151 | * An element must be an instance of type "FinalState class". | ||
18152 | */ | ||
18153 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18154 | Type.name(type,"FinalState class"); | ||
18155 | find directInstanceOf(problem,interpretation,element,type); | ||
18156 | } | ||
18157 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18158 | find interpretation(problem,interpretation); | ||
18159 | PartialInterpretation.scopes(interpretation,scope); | ||
18160 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18161 | Scope.maxNewElements(scope,0); | ||
18162 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18163 | Type.name(type,"FinalState class"); | ||
18164 | } | ||
18165 | |||
18166 | /** | ||
18167 | * An element may be an instance of type "FinalState class". | ||
18168 | */ | ||
18169 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18170 | { | ||
18171 | find interpretation(problem,interpretation); | ||
18172 | PartialInterpretation.newElements(interpretation,element); | ||
18173 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18174 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18175 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18176 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18177 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
18178 | neg find isPrimitive(element); | ||
18179 | } or { | ||
18180 | find interpretation(problem,interpretation); | ||
18181 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18182 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18183 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18184 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18185 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18186 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
18187 | neg find isPrimitive(element); | ||
18188 | } or | ||
18189 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
18190 | /** | ||
18191 | * An element must be an instance of type "Statechart class DefinedPart". | ||
18192 | */ | ||
18193 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18194 | Type.name(type,"Statechart class DefinedPart"); | ||
18195 | find directInstanceOf(problem,interpretation,element,type); | ||
18196 | } | ||
18197 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18198 | find interpretation(problem,interpretation); | ||
18199 | PartialInterpretation.scopes(interpretation,scope); | ||
18200 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18201 | Scope.maxNewElements(scope,0); | ||
18202 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18203 | Type.name(type,"Statechart class DefinedPart"); | ||
18204 | } | ||
18205 | |||
18206 | /** | ||
18207 | * An element may be an instance of type "Statechart class DefinedPart". | ||
18208 | */ | ||
18209 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18210 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
18211 | /** | ||
18212 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
18213 | */ | ||
18214 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18215 | Type.name(type,"Statechart class UndefinedPart"); | ||
18216 | find directInstanceOf(problem,interpretation,element,type); | ||
18217 | } | ||
18218 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18219 | find interpretation(problem,interpretation); | ||
18220 | PartialInterpretation.scopes(interpretation,scope); | ||
18221 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18222 | Scope.maxNewElements(scope,0); | ||
18223 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18224 | Type.name(type,"Statechart class UndefinedPart"); | ||
18225 | } | ||
18226 | |||
18227 | /** | ||
18228 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
18229 | */ | ||
18230 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18231 | { | ||
18232 | find interpretation(problem,interpretation); | ||
18233 | PartialInterpretation.newElements(interpretation,element); | ||
18234 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18235 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18236 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18237 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
18238 | neg find isPrimitive(element); | ||
18239 | } or { | ||
18240 | find interpretation(problem,interpretation); | ||
18241 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18242 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18243 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18244 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18245 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
18246 | neg find isPrimitive(element); | ||
18247 | } or | ||
18248 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
18249 | /** | ||
18250 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
18251 | */ | ||
18252 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18253 | Type.name(type,"CompositeElement class DefinedPart"); | ||
18254 | find directInstanceOf(problem,interpretation,element,type); | ||
18255 | } | ||
18256 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18257 | find interpretation(problem,interpretation); | ||
18258 | PartialInterpretation.scopes(interpretation,scope); | ||
18259 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18260 | Scope.maxNewElements(scope,0); | ||
18261 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18262 | Type.name(type,"CompositeElement class DefinedPart"); | ||
18263 | } | ||
18264 | |||
18265 | /** | ||
18266 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
18267 | */ | ||
18268 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18269 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
18270 | /** | ||
18271 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
18272 | */ | ||
18273 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18274 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
18275 | find directInstanceOf(problem,interpretation,element,type); | ||
18276 | } | ||
18277 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18278 | find interpretation(problem,interpretation); | ||
18279 | PartialInterpretation.scopes(interpretation,scope); | ||
18280 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18281 | Scope.maxNewElements(scope,0); | ||
18282 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18283 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
18284 | } | ||
18285 | |||
18286 | /** | ||
18287 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
18288 | */ | ||
18289 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18290 | { | ||
18291 | find interpretation(problem,interpretation); | ||
18292 | PartialInterpretation.newElements(interpretation,element); | ||
18293 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18294 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18295 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18296 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18297 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
18298 | neg find isPrimitive(element); | ||
18299 | } or { | ||
18300 | find interpretation(problem,interpretation); | ||
18301 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18302 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18303 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18304 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18305 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18306 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
18307 | neg find isPrimitive(element); | ||
18308 | } or | ||
18309 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
18310 | |||
18311 | ////////// | ||
18312 | // 1.2 Relation Declaration Indexers | ||
18313 | ////////// | ||
18314 | /** | ||
18315 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
18316 | */ | ||
18317 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
18318 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18319 | source: DefinedElement, target:DefinedElement) | ||
18320 | { | ||
18321 | find interpretation(problem,interpretation); | ||
18322 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18323 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
18324 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18325 | BinaryElementRelationLink.param1(link,source); | ||
18326 | BinaryElementRelationLink.param2(link,target); | ||
18327 | } | ||
18328 | /** | ||
18329 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
18330 | */ | ||
18331 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
18332 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18333 | source: DefinedElement, target:DefinedElement) | ||
18334 | { | ||
18335 | find interpretation(problem,interpretation); | ||
18336 | // The two endpoint of the link have to exist | ||
18337 | find mayExist(problem, interpretation, source); | ||
18338 | find mayExist(problem, interpretation, target); | ||
18339 | // Type consistency | ||
18340 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
18341 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
18342 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18343 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18344 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
18345 | check(numberOfExistingOppositeReferences < 1); | ||
18346 | } or { | ||
18347 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
18348 | } | ||
18349 | /** | ||
18350 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
18351 | */ | ||
18352 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
18353 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18354 | source: DefinedElement, target:DefinedElement) | ||
18355 | { | ||
18356 | find interpretation(problem,interpretation); | ||
18357 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18358 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
18359 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18360 | BinaryElementRelationLink.param1(link,source); | ||
18361 | BinaryElementRelationLink.param2(link,target); | ||
18362 | } | ||
18363 | /** | ||
18364 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
18365 | */ | ||
18366 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
18367 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18368 | source: DefinedElement, target:DefinedElement) | ||
18369 | { | ||
18370 | find interpretation(problem,interpretation); | ||
18371 | // The two endpoint of the link have to exist | ||
18372 | find mayExist(problem, interpretation, source); | ||
18373 | find mayExist(problem, interpretation, target); | ||
18374 | // Type consistency | ||
18375 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
18376 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
18377 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18378 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18379 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
18380 | check(numberOfExistingOppositeReferences < 1); | ||
18381 | // The reference is containment, then a new reference cannot be create if: | ||
18382 | // 1. Multiple parents | ||
18383 | neg find mustContains4(problem,interpretation,_,target); | ||
18384 | // 2. Circle in the containment hierarchy | ||
18385 | neg find mustTransitiveContains(source,target); | ||
18386 | } or { | ||
18387 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
18388 | } | ||
18389 | /** | ||
18390 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
18391 | */ | ||
18392 | private pattern mustInRelationvertices_reference_Region( | ||
18393 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18394 | source: DefinedElement, target:DefinedElement) | ||
18395 | { | ||
18396 | find interpretation(problem,interpretation); | ||
18397 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18398 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
18399 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18400 | BinaryElementRelationLink.param1(link,source); | ||
18401 | BinaryElementRelationLink.param2(link,target); | ||
18402 | } | ||
18403 | /** | ||
18404 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
18405 | */ | ||
18406 | private pattern mayInRelationvertices_reference_Region( | ||
18407 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18408 | source: DefinedElement, target:DefinedElement) | ||
18409 | { | ||
18410 | find interpretation(problem,interpretation); | ||
18411 | // The two endpoint of the link have to exist | ||
18412 | find mayExist(problem, interpretation, source); | ||
18413 | find mayExist(problem, interpretation, target); | ||
18414 | // Type consistency | ||
18415 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
18416 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
18417 | // The reference is containment, then a new reference cannot be create if: | ||
18418 | // 1. Multiple parents | ||
18419 | neg find mustContains4(problem,interpretation,_,target); | ||
18420 | // 2. Circle in the containment hierarchy | ||
18421 | neg find mustTransitiveContains(source,target); | ||
18422 | } or { | ||
18423 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
18424 | } | ||
18425 | /** | ||
18426 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
18427 | */ | ||
18428 | private pattern mustInRelationtarget_reference_Transition( | ||
18429 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18430 | source: DefinedElement, target:DefinedElement) | ||
18431 | { | ||
18432 | find interpretation(problem,interpretation); | ||
18433 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18434 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
18435 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18436 | BinaryElementRelationLink.param1(link,source); | ||
18437 | BinaryElementRelationLink.param2(link,target); | ||
18438 | } | ||
18439 | /** | ||
18440 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
18441 | */ | ||
18442 | private pattern mayInRelationtarget_reference_Transition( | ||
18443 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18444 | source: DefinedElement, target:DefinedElement) | ||
18445 | { | ||
18446 | find interpretation(problem,interpretation); | ||
18447 | // The two endpoint of the link have to exist | ||
18448 | find mayExist(problem, interpretation, source); | ||
18449 | find mayExist(problem, interpretation, target); | ||
18450 | // Type consistency | ||
18451 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
18452 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
18453 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18454 | // the upper bound of the multiplicity should be considered. | ||
18455 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
18456 | check(numberOfExistingReferences < 1); | ||
18457 | } or { | ||
18458 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
18459 | } | ||
18460 | /** | ||
18461 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
18462 | */ | ||
18463 | private pattern mustInRelationsource_reference_Transition( | ||
18464 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18465 | source: DefinedElement, target:DefinedElement) | ||
18466 | { | ||
18467 | find interpretation(problem,interpretation); | ||
18468 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18469 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
18470 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18471 | BinaryElementRelationLink.param1(link,source); | ||
18472 | BinaryElementRelationLink.param2(link,target); | ||
18473 | } | ||
18474 | /** | ||
18475 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
18476 | */ | ||
18477 | private pattern mayInRelationsource_reference_Transition( | ||
18478 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18479 | source: DefinedElement, target:DefinedElement) | ||
18480 | { | ||
18481 | find interpretation(problem,interpretation); | ||
18482 | // The two endpoint of the link have to exist | ||
18483 | find mayExist(problem, interpretation, source); | ||
18484 | find mayExist(problem, interpretation, target); | ||
18485 | // Type consistency | ||
18486 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
18487 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
18488 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18489 | // the upper bound of the multiplicity should be considered. | ||
18490 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
18491 | check(numberOfExistingReferences < 1); | ||
18492 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
18493 | // 1. Multiple parents | ||
18494 | neg find mustContains4(problem,interpretation,source,_); | ||
18495 | // 2. Circle in the containment hierarchy | ||
18496 | neg find mustTransitiveContains(source,target); | ||
18497 | } or { | ||
18498 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
18499 | } | ||
18500 | /** | ||
18501 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
18502 | */ | ||
18503 | private pattern mustInRelationregions_reference_CompositeElement( | ||
18504 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18505 | source: DefinedElement, target:DefinedElement) | ||
18506 | { | ||
18507 | find interpretation(problem,interpretation); | ||
18508 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18509 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
18510 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18511 | BinaryElementRelationLink.param1(link,source); | ||
18512 | BinaryElementRelationLink.param2(link,target); | ||
18513 | } | ||
18514 | /** | ||
18515 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
18516 | */ | ||
18517 | private pattern mayInRelationregions_reference_CompositeElement( | ||
18518 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18519 | source: DefinedElement, target:DefinedElement) | ||
18520 | { | ||
18521 | find interpretation(problem,interpretation); | ||
18522 | // The two endpoint of the link have to exist | ||
18523 | find mayExist(problem, interpretation, source); | ||
18524 | find mayExist(problem, interpretation, target); | ||
18525 | // Type consistency | ||
18526 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
18527 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
18528 | // The reference is containment, then a new reference cannot be create if: | ||
18529 | // 1. Multiple parents | ||
18530 | neg find mustContains4(problem,interpretation,_,target); | ||
18531 | // 2. Circle in the containment hierarchy | ||
18532 | neg find mustTransitiveContains(source,target); | ||
18533 | } or { | ||
18534 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
18535 | } | ||
18536 | |||
18537 | ////////// | ||
18538 | // 1.3 Relation Definition Indexers | ||
18539 | ////////// | ||
18540 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
18541 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
18542 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18543 | var_r1, var_e1) | ||
18544 | { | ||
18545 | find interpretation(problem,interpretation); | ||
18546 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18547 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
18548 | // r1 is exported | ||
18549 | // e1 is exported | ||
18550 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18551 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
18552 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18553 | var_virtual0 == var_e1; | ||
18554 | } | ||
18555 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
18556 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18557 | var_r1, var_e1) | ||
18558 | { | ||
18559 | find interpretation(problem,interpretation); | ||
18560 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18561 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
18562 | // r1 is exported | ||
18563 | // e1 is exported | ||
18564 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18565 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
18566 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18567 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
18568 | } | ||
18569 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
18570 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18571 | var_r1, var_e1) | ||
18572 | { | ||
18573 | find interpretation(problem,interpretation); | ||
18574 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18575 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
18576 | // r1 is exported | ||
18577 | // e1 is exported | ||
18578 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18579 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
18580 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18581 | var_virtual0 == var_e1; | ||
18582 | } | ||
18583 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
18584 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
18585 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18586 | var_r1) | ||
18587 | { | ||
18588 | find interpretation(problem,interpretation); | ||
18589 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18590 | // r1 is exported | ||
18591 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
18592 | } | ||
18593 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
18594 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18595 | var_r1) | ||
18596 | { | ||
18597 | find interpretation(problem,interpretation); | ||
18598 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18599 | // r1 is exported | ||
18600 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
18601 | } | ||
18602 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
18603 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18604 | var_r1) | ||
18605 | { | ||
18606 | find interpretation(problem,interpretation); | ||
18607 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18608 | // r1 is exported | ||
18609 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
18610 | } | ||
18611 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
18612 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
18613 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18614 | var_r) | ||
18615 | { | ||
18616 | find interpretation(problem,interpretation); | ||
18617 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
18618 | // r is exported | ||
18619 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
18620 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
18621 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
18622 | } | ||
18623 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
18624 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18625 | var_r) | ||
18626 | { | ||
18627 | find interpretation(problem,interpretation); | ||
18628 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
18629 | // r is exported | ||
18630 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
18631 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
18632 | var_e1 != var_e2; | ||
18633 | } | ||
18634 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
18635 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18636 | var_r) | ||
18637 | { | ||
18638 | find interpretation(problem,interpretation); | ||
18639 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
18640 | // r is exported | ||
18641 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
18642 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
18643 | var_e1 != var_e2; | ||
18644 | } | ||
18645 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
18646 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
18647 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18648 | var_t, var_src, var_trg) | ||
18649 | { | ||
18650 | find interpretation(problem,interpretation); | ||
18651 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18652 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
18653 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
18654 | // t is exported | ||
18655 | // src is exported | ||
18656 | // trg is exported | ||
18657 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18658 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
18659 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18660 | var_virtual0 == var_src; | ||
18661 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18662 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
18663 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
18664 | var_virtual1 == var_trg; | ||
18665 | } | ||
18666 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
18667 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18668 | var_t, var_src, var_trg) | ||
18669 | { | ||
18670 | find interpretation(problem,interpretation); | ||
18671 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18672 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
18673 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
18674 | // t is exported | ||
18675 | // src is exported | ||
18676 | // trg is exported | ||
18677 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18678 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
18679 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18680 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
18681 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18682 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
18683 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
18684 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
18685 | } | ||
18686 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
18687 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18688 | var_t, var_src, var_trg) | ||
18689 | { | ||
18690 | find interpretation(problem,interpretation); | ||
18691 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18692 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
18693 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
18694 | // t is exported | ||
18695 | // src is exported | ||
18696 | // trg is exported | ||
18697 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18698 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
18699 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18700 | var_virtual0 == var_src; | ||
18701 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18702 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
18703 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
18704 | var_virtual1 == var_trg; | ||
18705 | } | ||
18706 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
18707 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
18708 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18709 | var_t, var_e) | ||
18710 | { | ||
18711 | find interpretation(problem,interpretation); | ||
18712 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18713 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18714 | // t is exported | ||
18715 | // e is exported | ||
18716 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
18717 | } | ||
18718 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
18719 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18720 | var_t, var_e) | ||
18721 | { | ||
18722 | find interpretation(problem,interpretation); | ||
18723 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18724 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
18725 | // t is exported | ||
18726 | // e is exported | ||
18727 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
18728 | } | ||
18729 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
18730 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18731 | var_t, var_e) | ||
18732 | { | ||
18733 | find interpretation(problem,interpretation); | ||
18734 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18735 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18736 | // t is exported | ||
18737 | // e is exported | ||
18738 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
18739 | } | ||
18740 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
18741 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
18742 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18743 | var_e) | ||
18744 | { | ||
18745 | find interpretation(problem,interpretation); | ||
18746 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18747 | // e is exported | ||
18748 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
18749 | } | ||
18750 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
18751 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18752 | var_e) | ||
18753 | { | ||
18754 | find interpretation(problem,interpretation); | ||
18755 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
18756 | // e is exported | ||
18757 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
18758 | } | ||
18759 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
18760 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18761 | var_e) | ||
18762 | { | ||
18763 | find interpretation(problem,interpretation); | ||
18764 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18765 | // e is exported | ||
18766 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
18767 | } | ||
18768 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
18769 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
18770 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18771 | var_e, var_t1, var_t2) | ||
18772 | { | ||
18773 | find interpretation(problem,interpretation); | ||
18774 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18775 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
18776 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
18777 | // e is exported | ||
18778 | // t1 is exported | ||
18779 | // t2 is exported | ||
18780 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18781 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
18782 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18783 | var_virtual0 == var_t1; | ||
18784 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18785 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
18786 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
18787 | var_virtual1 == var_t2; | ||
18788 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
18789 | } | ||
18790 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
18791 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18792 | var_e, var_t1, var_t2) | ||
18793 | { | ||
18794 | find interpretation(problem,interpretation); | ||
18795 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
18796 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
18797 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
18798 | // e is exported | ||
18799 | // t1 is exported | ||
18800 | // t2 is exported | ||
18801 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
18802 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
18803 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18804 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
18805 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
18806 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
18807 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
18808 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
18809 | var_t1 != var_t2; | ||
18810 | } | ||
18811 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
18812 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18813 | var_e, var_t1, var_t2) | ||
18814 | { | ||
18815 | find interpretation(problem,interpretation); | ||
18816 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18817 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
18818 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
18819 | // e is exported | ||
18820 | // t1 is exported | ||
18821 | // t2 is exported | ||
18822 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18823 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
18824 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18825 | var_virtual0 == var_t1; | ||
18826 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18827 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
18828 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
18829 | var_virtual1 == var_t2; | ||
18830 | var_t1 != var_t2; | ||
18831 | } | ||
18832 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
18833 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
18834 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18835 | var_t, var_e) | ||
18836 | { | ||
18837 | find interpretation(problem,interpretation); | ||
18838 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18839 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
18840 | // t is exported | ||
18841 | // e is exported | ||
18842 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
18843 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
18844 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18845 | var_virtual0 == var_t; | ||
18846 | } | ||
18847 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
18848 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18849 | var_t, var_e) | ||
18850 | { | ||
18851 | find interpretation(problem,interpretation); | ||
18852 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18853 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
18854 | // t is exported | ||
18855 | // e is exported | ||
18856 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
18857 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
18858 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18859 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
18860 | } | ||
18861 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
18862 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18863 | var_t, var_e) | ||
18864 | { | ||
18865 | find interpretation(problem,interpretation); | ||
18866 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18867 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
18868 | // t is exported | ||
18869 | // e is exported | ||
18870 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
18871 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
18872 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18873 | var_virtual0 == var_t; | ||
18874 | } | ||
18875 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
18876 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
18877 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18878 | var_t, var_f) | ||
18879 | { | ||
18880 | find interpretation(problem,interpretation); | ||
18881 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18882 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
18883 | // t is exported | ||
18884 | // f is exported | ||
18885 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
18886 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
18887 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18888 | var_virtual0 == var_t; | ||
18889 | } | ||
18890 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
18891 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18892 | var_t, var_f) | ||
18893 | { | ||
18894 | find interpretation(problem,interpretation); | ||
18895 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18896 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
18897 | // t is exported | ||
18898 | // f is exported | ||
18899 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
18900 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
18901 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18902 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
18903 | } | ||
18904 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
18905 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18906 | var_t, var_f) | ||
18907 | { | ||
18908 | find interpretation(problem,interpretation); | ||
18909 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18910 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
18911 | // t is exported | ||
18912 | // f is exported | ||
18913 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
18914 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
18915 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
18916 | var_virtual0 == var_t; | ||
18917 | } | ||
18918 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
18919 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
18920 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18921 | var_region) | ||
18922 | { | ||
18923 | find interpretation(problem,interpretation); | ||
18924 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
18925 | // region is exported | ||
18926 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
18927 | } | ||
18928 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
18929 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18930 | var_region) | ||
18931 | { | ||
18932 | find interpretation(problem,interpretation); | ||
18933 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
18934 | // region is exported | ||
18935 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
18936 | } | ||
18937 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
18938 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18939 | var_region) | ||
18940 | { | ||
18941 | find interpretation(problem,interpretation); | ||
18942 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
18943 | // region is exported | ||
18944 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
18945 | } | ||
18946 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
18947 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
18948 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18949 | var_region, var_state) | ||
18950 | { | ||
18951 | find interpretation(problem,interpretation); | ||
18952 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
18953 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
18954 | // region is exported | ||
18955 | // state is exported | ||
18956 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
18957 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
18958 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18959 | var_virtual0 == var_state; | ||
18960 | } | ||
18961 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
18962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18963 | var_region, var_state) | ||
18964 | { | ||
18965 | find interpretation(problem,interpretation); | ||
18966 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
18967 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
18968 | // region is exported | ||
18969 | // state is exported | ||
18970 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
18971 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
18972 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18973 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
18974 | } | ||
18975 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
18976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18977 | var_region, var_state) | ||
18978 | { | ||
18979 | find interpretation(problem,interpretation); | ||
18980 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
18981 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
18982 | // region is exported | ||
18983 | // state is exported | ||
18984 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
18985 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
18986 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18987 | var_virtual0 == var_state; | ||
18988 | } | ||
18989 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
18990 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
18991 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18992 | var_c) | ||
18993 | { | ||
18994 | find interpretation(problem,interpretation); | ||
18995 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
18996 | // c is exported | ||
18997 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
18998 | } | ||
18999 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
19000 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19001 | var_c) | ||
19002 | { | ||
19003 | find interpretation(problem,interpretation); | ||
19004 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
19005 | // c is exported | ||
19006 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
19007 | } | ||
19008 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
19009 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19010 | var_c) | ||
19011 | { | ||
19012 | find interpretation(problem,interpretation); | ||
19013 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
19014 | // c is exported | ||
19015 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
19016 | } | ||
19017 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
19018 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
19019 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19020 | var_c) | ||
19021 | { | ||
19022 | find interpretation(problem,interpretation); | ||
19023 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
19024 | // c is exported | ||
19025 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
19026 | } | ||
19027 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
19028 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19029 | var_c) | ||
19030 | { | ||
19031 | find interpretation(problem,interpretation); | ||
19032 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
19033 | // c is exported | ||
19034 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
19035 | } | ||
19036 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
19037 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19038 | var_c) | ||
19039 | { | ||
19040 | find interpretation(problem,interpretation); | ||
19041 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
19042 | // c is exported | ||
19043 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
19044 | } | ||
19045 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
19046 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
19047 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19048 | var_s) | ||
19049 | { | ||
19050 | find interpretation(problem,interpretation); | ||
19051 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19052 | // s is exported | ||
19053 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
19054 | } | ||
19055 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
19056 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19057 | var_s) | ||
19058 | { | ||
19059 | find interpretation(problem,interpretation); | ||
19060 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19061 | // s is exported | ||
19062 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
19063 | } | ||
19064 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
19065 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19066 | var_s) | ||
19067 | { | ||
19068 | find interpretation(problem,interpretation); | ||
19069 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19070 | // s is exported | ||
19071 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
19072 | } | ||
19073 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
19074 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
19075 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19076 | var_s) | ||
19077 | { | ||
19078 | find interpretation(problem,interpretation); | ||
19079 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19080 | // s is exported | ||
19081 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
19082 | } | ||
19083 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
19084 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19085 | var_s) | ||
19086 | { | ||
19087 | find interpretation(problem,interpretation); | ||
19088 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19089 | // s is exported | ||
19090 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
19091 | } | ||
19092 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
19093 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19094 | var_s) | ||
19095 | { | ||
19096 | find interpretation(problem,interpretation); | ||
19097 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19098 | // s is exported | ||
19099 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
19100 | } | ||
19101 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
19102 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
19103 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19104 | var_s, var_v1, var_v2) | ||
19105 | { | ||
19106 | find interpretation(problem,interpretation); | ||
19107 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19108 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19109 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19110 | // s is exported | ||
19111 | // v1 is exported | ||
19112 | // v2 is exported | ||
19113 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
19114 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
19115 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19116 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19117 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19118 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19119 | var_virtual0 == var_v1; | ||
19120 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19121 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19122 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19123 | var_virtual1 == var_v2; | ||
19124 | }or{ | ||
19125 | find interpretation(problem,interpretation); | ||
19126 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19127 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19128 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19129 | // s is exported | ||
19130 | // v1 is exported | ||
19131 | // v2 is exported | ||
19132 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
19133 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
19134 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19135 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19136 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19137 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19138 | var_virtual0 == var_v1; | ||
19139 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19140 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19141 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19142 | var_virtual1 == var_v2; | ||
19143 | } | ||
19144 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
19145 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19146 | var_s, var_v1, var_v2) | ||
19147 | { | ||
19148 | find interpretation(problem,interpretation); | ||
19149 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19150 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19151 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19152 | // s is exported | ||
19153 | // v1 is exported | ||
19154 | // v2 is exported | ||
19155 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
19156 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
19157 | var_t1 != var_t2; | ||
19158 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19159 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19160 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19161 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
19162 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19163 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19164 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19165 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
19166 | }or{ | ||
19167 | find interpretation(problem,interpretation); | ||
19168 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19169 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19170 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19171 | // s is exported | ||
19172 | // v1 is exported | ||
19173 | // v2 is exported | ||
19174 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
19175 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
19176 | var_t1 != var_t2; | ||
19177 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19178 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19179 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19180 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
19181 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19182 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19183 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19184 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
19185 | } | ||
19186 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
19187 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19188 | var_s, var_v1, var_v2) | ||
19189 | { | ||
19190 | find interpretation(problem,interpretation); | ||
19191 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19192 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19193 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19194 | // s is exported | ||
19195 | // v1 is exported | ||
19196 | // v2 is exported | ||
19197 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
19198 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
19199 | var_t1 != var_t2; | ||
19200 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19201 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19202 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19203 | var_virtual0 == var_v1; | ||
19204 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19205 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19206 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19207 | var_virtual1 == var_v2; | ||
19208 | }or{ | ||
19209 | find interpretation(problem,interpretation); | ||
19210 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19211 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19212 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19213 | // s is exported | ||
19214 | // v1 is exported | ||
19215 | // v2 is exported | ||
19216 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
19217 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
19218 | var_t1 != var_t2; | ||
19219 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19220 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19221 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19222 | var_virtual0 == var_v1; | ||
19223 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19224 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19225 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19226 | var_virtual1 == var_v2; | ||
19227 | } | ||
19228 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
19229 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
19230 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19231 | var_s) | ||
19232 | { | ||
19233 | find interpretation(problem,interpretation); | ||
19234 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19235 | // s is exported | ||
19236 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
19237 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
19238 | } | ||
19239 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
19240 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19241 | var_s) | ||
19242 | { | ||
19243 | find interpretation(problem,interpretation); | ||
19244 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19245 | // s is exported | ||
19246 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
19247 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
19248 | } | ||
19249 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
19250 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19251 | var_s) | ||
19252 | { | ||
19253 | find interpretation(problem,interpretation); | ||
19254 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19255 | // s is exported | ||
19256 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
19257 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
19258 | } | ||
19259 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
19260 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
19261 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19262 | var_v) | ||
19263 | { | ||
19264 | find interpretation(problem,interpretation); | ||
19265 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19266 | // v is exported | ||
19267 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
19268 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
19269 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
19270 | } | ||
19271 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
19272 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19273 | var_v) | ||
19274 | { | ||
19275 | find interpretation(problem,interpretation); | ||
19276 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19277 | // v is exported | ||
19278 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
19279 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
19280 | var_trg1 != var_trg2; | ||
19281 | } | ||
19282 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
19283 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19284 | var_v) | ||
19285 | { | ||
19286 | find interpretation(problem,interpretation); | ||
19287 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19288 | // v is exported | ||
19289 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
19290 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
19291 | var_trg1 != var_trg2; | ||
19292 | } | ||
19293 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
19294 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
19295 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19296 | var_v) | ||
19297 | { | ||
19298 | find interpretation(problem,interpretation); | ||
19299 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19300 | // v is exported | ||
19301 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
19302 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
19303 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
19304 | } | ||
19305 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
19306 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19307 | var_v) | ||
19308 | { | ||
19309 | find interpretation(problem,interpretation); | ||
19310 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19311 | // v is exported | ||
19312 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
19313 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
19314 | var_src1 != var_src2; | ||
19315 | } | ||
19316 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
19317 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19318 | var_v) | ||
19319 | { | ||
19320 | find interpretation(problem,interpretation); | ||
19321 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19322 | // v is exported | ||
19323 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
19324 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
19325 | var_src1 != var_src2; | ||
19326 | } | ||
19327 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
19328 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
19329 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19330 | var_s, var_v1, var_v2) | ||
19331 | { | ||
19332 | find interpretation(problem,interpretation); | ||
19333 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19334 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19335 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19336 | // s is exported | ||
19337 | // v1 is exported | ||
19338 | // v2 is exported | ||
19339 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
19340 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
19341 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19342 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19343 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19344 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19345 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19346 | var_virtual1 == var_v1; | ||
19347 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19348 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19349 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19350 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19351 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19352 | var_virtual3 == var_v2; | ||
19353 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
19354 | }or{ | ||
19355 | find interpretation(problem,interpretation); | ||
19356 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19357 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19358 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19359 | // s is exported | ||
19360 | // v1 is exported | ||
19361 | // v2 is exported | ||
19362 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
19363 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
19364 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19365 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19366 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19367 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19368 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19369 | var_virtual1 == var_v1; | ||
19370 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19371 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19372 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19373 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19374 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19375 | var_virtual3 == var_v2; | ||
19376 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
19377 | } | ||
19378 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
19379 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19380 | var_s, var_v1, var_v2) | ||
19381 | { | ||
19382 | find interpretation(problem,interpretation); | ||
19383 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19384 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19385 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19386 | // s is exported | ||
19387 | // v1 is exported | ||
19388 | // v2 is exported | ||
19389 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
19390 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
19391 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19392 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19393 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19394 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19395 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19396 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
19397 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19398 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19399 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19400 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19401 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19402 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
19403 | var_r1 != var_r2; | ||
19404 | }or{ | ||
19405 | find interpretation(problem,interpretation); | ||
19406 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19407 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19408 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19409 | // s is exported | ||
19410 | // v1 is exported | ||
19411 | // v2 is exported | ||
19412 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
19413 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
19414 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19415 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19416 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19417 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19418 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19419 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
19420 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19421 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19422 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19423 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19424 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19425 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
19426 | var_r1 != var_r2; | ||
19427 | } | ||
19428 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
19429 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19430 | var_s, var_v1, var_v2) | ||
19431 | { | ||
19432 | find interpretation(problem,interpretation); | ||
19433 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19434 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19435 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19436 | // s is exported | ||
19437 | // v1 is exported | ||
19438 | // v2 is exported | ||
19439 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
19440 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
19441 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19442 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19443 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19444 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19445 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19446 | var_virtual1 == var_v1; | ||
19447 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19448 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19449 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19450 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19451 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19452 | var_virtual3 == var_v2; | ||
19453 | var_r1 != var_r2; | ||
19454 | }or{ | ||
19455 | find interpretation(problem,interpretation); | ||
19456 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19457 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19458 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19459 | // s is exported | ||
19460 | // v1 is exported | ||
19461 | // v2 is exported | ||
19462 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
19463 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
19464 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19465 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19466 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19467 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19468 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19469 | var_virtual1 == var_v1; | ||
19470 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19471 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19472 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19473 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19474 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19475 | var_virtual3 == var_v2; | ||
19476 | var_r1 != var_r2; | ||
19477 | } | ||
19478 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
19479 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
19480 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19481 | var_parent, var_child) | ||
19482 | { | ||
19483 | find interpretation(problem,interpretation); | ||
19484 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19485 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
19486 | // parent is exported | ||
19487 | // child is exported | ||
19488 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19489 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
19490 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19491 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19492 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19493 | var_virtual1 == var_child; | ||
19494 | } | ||
19495 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
19496 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19497 | var_parent, var_child) | ||
19498 | { | ||
19499 | find interpretation(problem,interpretation); | ||
19500 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19501 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
19502 | // parent is exported | ||
19503 | // child is exported | ||
19504 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19505 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
19506 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19507 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19508 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19509 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
19510 | } | ||
19511 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
19512 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19513 | var_parent, var_child) | ||
19514 | { | ||
19515 | find interpretation(problem,interpretation); | ||
19516 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19517 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
19518 | // parent is exported | ||
19519 | // child is exported | ||
19520 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19521 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
19522 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19523 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19524 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19525 | var_virtual1 == var_child; | ||
19526 | } | ||
19527 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
19528 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
19529 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19530 | var_s, var_v) | ||
19531 | { | ||
19532 | find interpretation(problem,interpretation); | ||
19533 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19534 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19535 | // s is exported | ||
19536 | // v is exported | ||
19537 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
19538 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19539 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19540 | }or{ | ||
19541 | find interpretation(problem,interpretation); | ||
19542 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19543 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19544 | // s is exported | ||
19545 | // v is exported | ||
19546 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
19547 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19548 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19549 | } | ||
19550 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
19551 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19552 | var_s, var_v) | ||
19553 | { | ||
19554 | find interpretation(problem,interpretation); | ||
19555 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19556 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
19557 | // s is exported | ||
19558 | // v is exported | ||
19559 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
19560 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19561 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19562 | }or{ | ||
19563 | find interpretation(problem,interpretation); | ||
19564 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19565 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
19566 | // s is exported | ||
19567 | // v is exported | ||
19568 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
19569 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19570 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19571 | } | ||
19572 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
19573 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19574 | var_s, var_v) | ||
19575 | { | ||
19576 | find interpretation(problem,interpretation); | ||
19577 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19578 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19579 | // s is exported | ||
19580 | // v is exported | ||
19581 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
19582 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19583 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19584 | }or{ | ||
19585 | find interpretation(problem,interpretation); | ||
19586 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19587 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19588 | // s is exported | ||
19589 | // v is exported | ||
19590 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
19591 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19592 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19593 | } | ||
19594 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
19595 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
19596 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19597 | var_composite) | ||
19598 | { | ||
19599 | find interpretation(problem,interpretation); | ||
19600 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19601 | // composite is exported | ||
19602 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19603 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
19604 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19605 | var_virtual0 == var_region1; | ||
19606 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19607 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
19608 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
19609 | var_virtual1 == var_region2; | ||
19610 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
19611 | } | ||
19612 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
19613 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19614 | var_composite) | ||
19615 | { | ||
19616 | find interpretation(problem,interpretation); | ||
19617 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19618 | // composite is exported | ||
19619 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19620 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
19621 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19622 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
19623 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19624 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
19625 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
19626 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
19627 | var_region1 != var_region2; | ||
19628 | } | ||
19629 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
19630 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19631 | var_composite) | ||
19632 | { | ||
19633 | find interpretation(problem,interpretation); | ||
19634 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19635 | // composite is exported | ||
19636 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19637 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
19638 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19639 | var_virtual0 == var_region1; | ||
19640 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19641 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
19642 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
19643 | var_virtual1 == var_region2; | ||
19644 | var_region1 != var_region2; | ||
19645 | } | ||
19646 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
19647 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
19648 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19649 | var_s) | ||
19650 | { | ||
19651 | find interpretation(problem,interpretation); | ||
19652 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19653 | // s is exported | ||
19654 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19655 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19656 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19657 | var_virtual0 == var_s; | ||
19658 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19659 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19660 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19661 | var_virtual1 == var_s; | ||
19662 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19663 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19664 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19665 | var_virtual2 == var_s; | ||
19666 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19667 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
19668 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
19669 | }or{ | ||
19670 | find interpretation(problem,interpretation); | ||
19671 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19672 | // s is exported | ||
19673 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19674 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19675 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19676 | var_virtual0 == var_s; | ||
19677 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19678 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19679 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19680 | var_virtual1 == var_s; | ||
19681 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19682 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19683 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19684 | var_virtual2 == var_s; | ||
19685 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19686 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
19687 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
19688 | } | ||
19689 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
19690 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19691 | var_s) | ||
19692 | { | ||
19693 | find interpretation(problem,interpretation); | ||
19694 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19695 | // s is exported | ||
19696 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19697 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19698 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19699 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
19700 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19701 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19702 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19703 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
19704 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19705 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19706 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19707 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
19708 | var_t1 != var_t2; | ||
19709 | var_t2 != var_t3; | ||
19710 | var_t1 != var_t3; | ||
19711 | }or{ | ||
19712 | find interpretation(problem,interpretation); | ||
19713 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19714 | // s is exported | ||
19715 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19716 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19717 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19718 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
19719 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19720 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19721 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19722 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
19723 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19724 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19725 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19726 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
19727 | var_t1 != var_t2; | ||
19728 | var_t2 != var_t3; | ||
19729 | var_t1 != var_t3; | ||
19730 | } | ||
19731 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
19732 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19733 | var_s) | ||
19734 | { | ||
19735 | find interpretation(problem,interpretation); | ||
19736 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19737 | // s is exported | ||
19738 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19739 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19740 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19741 | var_virtual0 == var_s; | ||
19742 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19743 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19744 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19745 | var_virtual1 == var_s; | ||
19746 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19747 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19748 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19749 | var_virtual2 == var_s; | ||
19750 | var_t1 != var_t2; | ||
19751 | var_t2 != var_t3; | ||
19752 | var_t1 != var_t3; | ||
19753 | }or{ | ||
19754 | find interpretation(problem,interpretation); | ||
19755 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19756 | // s is exported | ||
19757 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19758 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19759 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19760 | var_virtual0 == var_s; | ||
19761 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19762 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19763 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19764 | var_virtual1 == var_s; | ||
19765 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19766 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19767 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19768 | var_virtual2 == var_s; | ||
19769 | var_t1 != var_t2; | ||
19770 | var_t2 != var_t3; | ||
19771 | var_t1 != var_t3; | ||
19772 | } | ||
19773 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
19774 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
19775 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19776 | var_s1, var_s2) | ||
19777 | { | ||
19778 | find interpretation(problem,interpretation); | ||
19779 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
19780 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
19781 | // s1 is exported | ||
19782 | // s2 is exported | ||
19783 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
19784 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
19785 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
19786 | } | ||
19787 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
19788 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19789 | var_s1, var_s2) | ||
19790 | { | ||
19791 | find interpretation(problem,interpretation); | ||
19792 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
19793 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
19794 | // s1 is exported | ||
19795 | // s2 is exported | ||
19796 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
19797 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
19798 | var_s1 != var_s2; | ||
19799 | } | ||
19800 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
19801 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19802 | var_s1, var_s2) | ||
19803 | { | ||
19804 | find interpretation(problem,interpretation); | ||
19805 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
19806 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
19807 | // s1 is exported | ||
19808 | // s2 is exported | ||
19809 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
19810 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
19811 | var_s1 != var_s2; | ||
19812 | } | ||
19813 | |||
19814 | ////////// | ||
19815 | // 1.4 Containment Indexer | ||
19816 | ////////// | ||
19817 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
19818 | find mustContains4(_,_,source,target); | ||
19819 | } | ||
19820 | |||
19821 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19822 | source: DefinedElement, target: DefinedElement) | ||
19823 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
19824 | |||
19825 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
19826 | |||
19827 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
19828 | |||
19829 | private pattern mustTransitiveContains(source,target) { | ||
19830 | find mustContains2+(source,target); | ||
19831 | } | ||
19832 | |||
19833 | ////////// | ||
19834 | // 2. Invalidation Indexers | ||
19835 | ////////// | ||
19836 | // 2.1 Invalidated by WF Queries | ||
19837 | ////////// | ||
19838 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19839 | var_r1) | ||
19840 | { | ||
19841 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
19842 | } | ||
19843 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19844 | var_r) | ||
19845 | { | ||
19846 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
19847 | } | ||
19848 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19849 | var_t, var_e) | ||
19850 | { | ||
19851 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
19852 | } | ||
19853 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19854 | var_e) | ||
19855 | { | ||
19856 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
19857 | } | ||
19858 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19859 | var_e, var_t1, var_t2) | ||
19860 | { | ||
19861 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
19862 | } | ||
19863 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19864 | var_t, var_e) | ||
19865 | { | ||
19866 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
19867 | } | ||
19868 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19869 | var_t, var_f) | ||
19870 | { | ||
19871 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
19872 | } | ||
19873 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19874 | var_region) | ||
19875 | { | ||
19876 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
19877 | } | ||
19878 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19879 | var_c) | ||
19880 | { | ||
19881 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
19882 | } | ||
19883 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19884 | var_c) | ||
19885 | { | ||
19886 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
19887 | } | ||
19888 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19889 | var_s) | ||
19890 | { | ||
19891 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
19892 | } | ||
19893 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19894 | var_s) | ||
19895 | { | ||
19896 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
19897 | } | ||
19898 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19899 | var_s, var_v1, var_v2) | ||
19900 | { | ||
19901 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
19902 | } | ||
19903 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19904 | var_s) | ||
19905 | { | ||
19906 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
19907 | } | ||
19908 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19909 | var_s, var_v1, var_v2) | ||
19910 | { | ||
19911 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
19912 | } | ||
19913 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19914 | var_s, var_v) | ||
19915 | { | ||
19916 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
19917 | } | ||
19918 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19919 | var_s) | ||
19920 | { | ||
19921 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
19922 | } | ||
19923 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19924 | var_s1, var_s2) | ||
19925 | { | ||
19926 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
19927 | } | ||
19928 | |||
19929 | ////////// | ||
19930 | // 3. Unfinishedness Indexers | ||
19931 | ////////// | ||
19932 | // 3.1 Unfinishedness Measured by Multiplicity | ||
19933 | ////////// | ||
19934 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
19935 | find interpretation(problem,interpretation); | ||
19936 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19937 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
19938 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
19939 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
19940 | check(numberOfExistingReferences < 1); | ||
19941 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
19942 | } | ||
19943 | |||
19944 | ////////// | ||
19945 | // 3.2 Unfinishedness Measured by WF Queries | ||
19946 | ////////// | ||
19947 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19948 | var_r1) | ||
19949 | { | ||
19950 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
19951 | } | ||
19952 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19953 | var_r) | ||
19954 | { | ||
19955 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
19956 | } | ||
19957 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19958 | var_t, var_e) | ||
19959 | { | ||
19960 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
19961 | } | ||
19962 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19963 | var_e) | ||
19964 | { | ||
19965 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
19966 | } | ||
19967 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19968 | var_e, var_t1, var_t2) | ||
19969 | { | ||
19970 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
19971 | } | ||
19972 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19973 | var_t, var_e) | ||
19974 | { | ||
19975 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
19976 | } | ||
19977 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19978 | var_t, var_f) | ||
19979 | { | ||
19980 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
19981 | } | ||
19982 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19983 | var_region) | ||
19984 | { | ||
19985 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
19986 | } | ||
19987 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19988 | var_c) | ||
19989 | { | ||
19990 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
19991 | } | ||
19992 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19993 | var_c) | ||
19994 | { | ||
19995 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
19996 | } | ||
19997 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
19998 | var_s) | ||
19999 | { | ||
20000 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
20001 | } | ||
20002 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20003 | var_s) | ||
20004 | { | ||
20005 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
20006 | } | ||
20007 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20008 | var_s, var_v1, var_v2) | ||
20009 | { | ||
20010 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
20011 | } | ||
20012 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20013 | var_s) | ||
20014 | { | ||
20015 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
20016 | } | ||
20017 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20018 | var_s, var_v1, var_v2) | ||
20019 | { | ||
20020 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
20021 | } | ||
20022 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20023 | var_s, var_v) | ||
20024 | { | ||
20025 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
20026 | } | ||
20027 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20028 | var_s) | ||
20029 | { | ||
20030 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
20031 | } | ||
20032 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20033 | var_s1, var_s2) | ||
20034 | { | ||
20035 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
20036 | } | ||
20037 | |||
20038 | ////////// | ||
20039 | // 4. Refinement Indexers | ||
20040 | ////////// | ||
20041 | // 4.1 Object constructors | ||
20042 | ////////// | ||
20043 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
20044 | { | ||
20045 | find interpretation(problem,interpretation); | ||
20046 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
20047 | find mustExist(problem, interpretation, root); | ||
20048 | }or{ | ||
20049 | find interpretation(problem,interpretation); | ||
20050 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
20051 | find mustExist(problem, interpretation, root); | ||
20052 | }or{ | ||
20053 | find interpretation(problem,interpretation); | ||
20054 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
20055 | find mustExist(problem, interpretation, root); | ||
20056 | }or{ | ||
20057 | find interpretation(problem,interpretation); | ||
20058 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
20059 | find mustExist(problem, interpretation, root); | ||
20060 | }or{ | ||
20061 | find interpretation(problem,interpretation); | ||
20062 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
20063 | find mustExist(problem, interpretation, root); | ||
20064 | }or{ | ||
20065 | find interpretation(problem,interpretation); | ||
20066 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
20067 | find mustExist(problem, interpretation, root); | ||
20068 | }or{ | ||
20069 | find interpretation(problem,interpretation); | ||
20070 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
20071 | find mustExist(problem, interpretation, root); | ||
20072 | }or{ | ||
20073 | find interpretation(problem,interpretation); | ||
20074 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
20075 | find mustExist(problem, interpretation, root); | ||
20076 | }or{ | ||
20077 | find interpretation(problem,interpretation); | ||
20078 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
20079 | find mustExist(problem, interpretation, root); | ||
20080 | }or{ | ||
20081 | find interpretation(problem,interpretation); | ||
20082 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
20083 | find mustExist(problem, interpretation, root); | ||
20084 | }or{ | ||
20085 | find interpretation(problem,interpretation); | ||
20086 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
20087 | find mustExist(problem, interpretation, root); | ||
20088 | }or{ | ||
20089 | find interpretation(problem,interpretation); | ||
20090 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
20091 | find mustExist(problem, interpretation, root); | ||
20092 | }or{ | ||
20093 | find interpretation(problem,interpretation); | ||
20094 | find mustInstanceOfState_class(problem,interpretation,root); | ||
20095 | find mustExist(problem, interpretation, root); | ||
20096 | }or{ | ||
20097 | find interpretation(problem,interpretation); | ||
20098 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
20099 | find mustExist(problem, interpretation, root); | ||
20100 | }or{ | ||
20101 | find interpretation(problem,interpretation); | ||
20102 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
20103 | find mustExist(problem, interpretation, root); | ||
20104 | }or{ | ||
20105 | find interpretation(problem,interpretation); | ||
20106 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
20107 | find mustExist(problem, interpretation, root); | ||
20108 | }or{ | ||
20109 | find interpretation(problem,interpretation); | ||
20110 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
20111 | find mustExist(problem, interpretation, root); | ||
20112 | } | ||
20113 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
20114 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20115 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20116 | container:DefinedElement) | ||
20117 | { | ||
20118 | find interpretation(problem,interpretation); | ||
20119 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20120 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
20121 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20122 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
20123 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20124 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
20125 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
20126 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
20127 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
20128 | find mustExist(problem, interpretation, container); | ||
20129 | neg find mustExist(problem, interpretation, newObject); | ||
20130 | } | ||
20131 | pattern createObject_Transition_class( | ||
20132 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20133 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20134 | { | ||
20135 | find interpretation(problem,interpretation); | ||
20136 | neg find hasElementInContainment(problem,interpretation); | ||
20137 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20138 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
20139 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
20140 | find mayExist(problem, interpretation, newObject); | ||
20141 | neg find mustExist(problem, interpretation, newObject); | ||
20142 | } | ||
20143 | pattern createObject_Statechart_class_UndefinedPart( | ||
20144 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20145 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20146 | { | ||
20147 | find interpretation(problem,interpretation); | ||
20148 | neg find hasElementInContainment(problem,interpretation); | ||
20149 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20150 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
20151 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
20152 | find mayExist(problem, interpretation, newObject); | ||
20153 | neg find mustExist(problem, interpretation, newObject); | ||
20154 | } | ||
20155 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
20156 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20157 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20158 | container:DefinedElement) | ||
20159 | { | ||
20160 | find interpretation(problem,interpretation); | ||
20161 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20162 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
20163 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20164 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20165 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20166 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
20167 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20168 | find mustExist(problem, interpretation, container); | ||
20169 | neg find mustExist(problem, interpretation, newObject); | ||
20170 | } | ||
20171 | pattern createObject_Entry_class( | ||
20172 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20173 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20174 | { | ||
20175 | find interpretation(problem,interpretation); | ||
20176 | neg find hasElementInContainment(problem,interpretation); | ||
20177 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20178 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
20179 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
20180 | find mayExist(problem, interpretation, newObject); | ||
20181 | neg find mustExist(problem, interpretation, newObject); | ||
20182 | } | ||
20183 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
20184 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20185 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20186 | container:DefinedElement) | ||
20187 | { | ||
20188 | find interpretation(problem,interpretation); | ||
20189 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20190 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
20191 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20192 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20193 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20194 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
20195 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20196 | find mustExist(problem, interpretation, container); | ||
20197 | neg find mustExist(problem, interpretation, newObject); | ||
20198 | } | ||
20199 | pattern createObject_Synchronization_class( | ||
20200 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20201 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20202 | { | ||
20203 | find interpretation(problem,interpretation); | ||
20204 | neg find hasElementInContainment(problem,interpretation); | ||
20205 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20206 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
20207 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
20208 | find mayExist(problem, interpretation, newObject); | ||
20209 | neg find mustExist(problem, interpretation, newObject); | ||
20210 | } | ||
20211 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
20212 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20213 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20214 | container:DefinedElement) | ||
20215 | { | ||
20216 | find interpretation(problem,interpretation); | ||
20217 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20218 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
20219 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20220 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20221 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20222 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
20223 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20224 | find mustExist(problem, interpretation, container); | ||
20225 | neg find mustExist(problem, interpretation, newObject); | ||
20226 | } | ||
20227 | pattern createObject_Exit_class( | ||
20228 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20229 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20230 | { | ||
20231 | find interpretation(problem,interpretation); | ||
20232 | neg find hasElementInContainment(problem,interpretation); | ||
20233 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20234 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
20235 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
20236 | find mayExist(problem, interpretation, newObject); | ||
20237 | neg find mustExist(problem, interpretation, newObject); | ||
20238 | } | ||
20239 | pattern createObject_State_class_by_vertices_reference_Region( | ||
20240 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20241 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20242 | container:DefinedElement) | ||
20243 | { | ||
20244 | find interpretation(problem,interpretation); | ||
20245 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20246 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
20247 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20248 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20249 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20250 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
20251 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20252 | find mustExist(problem, interpretation, container); | ||
20253 | neg find mustExist(problem, interpretation, newObject); | ||
20254 | } | ||
20255 | pattern createObject_State_class( | ||
20256 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20257 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20258 | { | ||
20259 | find interpretation(problem,interpretation); | ||
20260 | neg find hasElementInContainment(problem,interpretation); | ||
20261 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20262 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
20263 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
20264 | find mayExist(problem, interpretation, newObject); | ||
20265 | neg find mustExist(problem, interpretation, newObject); | ||
20266 | } | ||
20267 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
20268 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20269 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20270 | container:DefinedElement) | ||
20271 | { | ||
20272 | find interpretation(problem,interpretation); | ||
20273 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20274 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
20275 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20276 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20277 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20278 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
20279 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20280 | find mustExist(problem, interpretation, container); | ||
20281 | neg find mustExist(problem, interpretation, newObject); | ||
20282 | } | ||
20283 | pattern createObject_FinalState_class( | ||
20284 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20285 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20286 | { | ||
20287 | find interpretation(problem,interpretation); | ||
20288 | neg find hasElementInContainment(problem,interpretation); | ||
20289 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20290 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
20291 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
20292 | find mayExist(problem, interpretation, newObject); | ||
20293 | neg find mustExist(problem, interpretation, newObject); | ||
20294 | } | ||
20295 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
20296 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20297 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20298 | container:DefinedElement) | ||
20299 | { | ||
20300 | find interpretation(problem,interpretation); | ||
20301 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20302 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
20303 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20304 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
20305 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
20306 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
20307 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
20308 | find mustExist(problem, interpretation, container); | ||
20309 | neg find mustExist(problem, interpretation, newObject); | ||
20310 | } | ||
20311 | pattern createObject_Region_class( | ||
20312 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20313 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20314 | { | ||
20315 | find interpretation(problem,interpretation); | ||
20316 | neg find hasElementInContainment(problem,interpretation); | ||
20317 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20318 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
20319 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
20320 | find mayExist(problem, interpretation, newObject); | ||
20321 | neg find mustExist(problem, interpretation, newObject); | ||
20322 | } | ||
20323 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
20324 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20325 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20326 | container:DefinedElement) | ||
20327 | { | ||
20328 | find interpretation(problem,interpretation); | ||
20329 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20330 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
20331 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20332 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20333 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20334 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
20335 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20336 | find mustExist(problem, interpretation, container); | ||
20337 | neg find mustExist(problem, interpretation, newObject); | ||
20338 | } | ||
20339 | pattern createObject_Choice_class( | ||
20340 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20341 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20342 | { | ||
20343 | find interpretation(problem,interpretation); | ||
20344 | neg find hasElementInContainment(problem,interpretation); | ||
20345 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20346 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
20347 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
20348 | find mayExist(problem, interpretation, newObject); | ||
20349 | neg find mustExist(problem, interpretation, newObject); | ||
20350 | } | ||
20351 | |||
20352 | ////////// | ||
20353 | // 4.2 Type refinement | ||
20354 | ////////// | ||
20355 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20356 | find interpretation(problem,interpretation); | ||
20357 | PartialInterpretation.newElements(interpretation,element); | ||
20358 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
20359 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20360 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20361 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20362 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20363 | } | ||
20364 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20365 | find interpretation(problem,interpretation); | ||
20366 | PartialInterpretation.newElements(interpretation,element); | ||
20367 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
20368 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20369 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
20370 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20371 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20372 | } | ||
20373 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20374 | find interpretation(problem,interpretation); | ||
20375 | PartialInterpretation.newElements(interpretation,element); | ||
20376 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
20377 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20378 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20379 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20380 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20381 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20382 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20383 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20384 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20385 | } | ||
20386 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20387 | find interpretation(problem,interpretation); | ||
20388 | PartialInterpretation.newElements(interpretation,element); | ||
20389 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
20390 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20391 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20392 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20393 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20394 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20395 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20396 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20397 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20398 | } | ||
20399 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20400 | find interpretation(problem,interpretation); | ||
20401 | PartialInterpretation.newElements(interpretation,element); | ||
20402 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
20403 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20404 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20405 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20406 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20407 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20408 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20409 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20410 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20411 | } | ||
20412 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20413 | find interpretation(problem,interpretation); | ||
20414 | PartialInterpretation.newElements(interpretation,element); | ||
20415 | find mayInstanceOfState_class(problem,interpretation,element); | ||
20416 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20417 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
20418 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
20419 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20420 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20421 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20422 | } | ||
20423 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20424 | find interpretation(problem,interpretation); | ||
20425 | PartialInterpretation.newElements(interpretation,element); | ||
20426 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
20427 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20428 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20429 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20430 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20431 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20432 | } | ||
20433 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20434 | find interpretation(problem,interpretation); | ||
20435 | PartialInterpretation.newElements(interpretation,element); | ||
20436 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
20437 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20438 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20439 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20440 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20441 | } | ||
20442 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20443 | find interpretation(problem,interpretation); | ||
20444 | PartialInterpretation.newElements(interpretation,element); | ||
20445 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
20446 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20447 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20448 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20449 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20450 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20451 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20452 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20453 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20454 | } | ||
20455 | |||
20456 | ////////// | ||
20457 | // 4.3 Relation refinement | ||
20458 | ////////// | ||
20459 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
20460 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20461 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
20462 | from: DefinedElement, to: DefinedElement) | ||
20463 | { | ||
20464 | find interpretation(problem,interpretation); | ||
20465 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20466 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
20467 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
20468 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
20469 | find mustExist(problem, interpretation, from); | ||
20470 | find mustExist(problem, interpretation, to); | ||
20471 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
20472 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
20473 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
20474 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
20475 | } | ||
20476 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
20477 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
20478 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
20479 | |||
20480 | ////////// | ||
20481 | // 0. Util | ||
20482 | ////////// | ||
20483 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20484 | PartialInterpretation.problem(interpretation,problem); | ||
20485 | } | ||
20486 | |||
20487 | ///////////////////////// | ||
20488 | // 0.1 Existence | ||
20489 | ///////////////////////// | ||
20490 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20491 | find interpretation(problem,interpretation); | ||
20492 | LogicProblem.elements(problem,element); | ||
20493 | } or { | ||
20494 | find interpretation(problem,interpretation); | ||
20495 | PartialInterpretation.newElements(interpretation,element); | ||
20496 | } | ||
20497 | |||
20498 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20499 | find mustExist(problem,interpretation,element); | ||
20500 | } or { | ||
20501 | find interpretation(problem,interpretation); | ||
20502 | neg find elementCloseWorld(element); | ||
20503 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20504 | } | ||
20505 | |||
20506 | private pattern elementCloseWorld(element:DefinedElement) { | ||
20507 | PartialInterpretation.openWorldElements(i,element); | ||
20508 | PartialInterpretation.maxNewElements(i,0); | ||
20509 | } or { | ||
20510 | Scope.targetTypeInterpretation(scope,interpretation); | ||
20511 | PartialTypeInterpratation.elements(interpretation,element); | ||
20512 | Scope.maxNewElements(scope,0); | ||
20513 | } | ||
20514 | |||
20515 | //////////////////////// | ||
20516 | // 0.2 Equivalence | ||
20517 | //////////////////////// | ||
20518 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
20519 | find mayExist(problem,interpretation,a); | ||
20520 | find mayExist(problem,interpretation,b); | ||
20521 | a == b; | ||
20522 | } | ||
20523 | |||
20524 | //////////////////////// | ||
20525 | // 0.3 Required Patterns by TypeIndexer | ||
20526 | //////////////////////// | ||
20527 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
20528 | find interpretation(problem,interpretation); | ||
20529 | LogicProblem.types(problem,type); | ||
20530 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20531 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20532 | } | ||
20533 | |||
20534 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
20535 | find interpretation(problem,interpretation); | ||
20536 | LogicProblem.types(problem,type); | ||
20537 | TypeDefinition.elements(type,element); | ||
20538 | } or { | ||
20539 | find interpretation(problem,interpretation); | ||
20540 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
20541 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
20542 | } | ||
20543 | |||
20544 | private pattern isPrimitive(element: PrimitiveElement) { | ||
20545 | PrimitiveElement(element); | ||
20546 | } | ||
20547 | |||
20548 | ////////// | ||
20549 | // 1. Problem-Specific Base Indexers | ||
20550 | ////////// | ||
20551 | // 1.1 Type Indexers | ||
20552 | ////////// | ||
20553 | // 1.1.1 primitive Type Indexers | ||
20554 | ////////// | ||
20555 | |||
20556 | ////////// | ||
20557 | // 1.1.2 domain-specific Type Indexers | ||
20558 | ////////// | ||
20559 | /** | ||
20560 | * An element must be an instance of type "Pseudostate class". | ||
20561 | */ | ||
20562 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20563 | Type.name(type,"Pseudostate class"); | ||
20564 | find directInstanceOf(problem,interpretation,element,type); | ||
20565 | } | ||
20566 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20567 | find interpretation(problem,interpretation); | ||
20568 | PartialInterpretation.scopes(interpretation,scope); | ||
20569 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20570 | Scope.maxNewElements(scope,0); | ||
20571 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20572 | Type.name(type,"Pseudostate class"); | ||
20573 | } | ||
20574 | |||
20575 | /** | ||
20576 | * An element may be an instance of type "Pseudostate class". | ||
20577 | */ | ||
20578 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20579 | { | ||
20580 | find interpretation(problem,interpretation); | ||
20581 | PartialInterpretation.newElements(interpretation,element); | ||
20582 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20583 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20584 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20585 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20586 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20587 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20588 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20589 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20590 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
20591 | neg find isPrimitive(element); | ||
20592 | } or { | ||
20593 | find interpretation(problem,interpretation); | ||
20594 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20595 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20596 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20597 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20598 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20599 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20600 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20601 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20602 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20603 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
20604 | neg find isPrimitive(element); | ||
20605 | } or | ||
20606 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
20607 | /** | ||
20608 | * An element must be an instance of type "Vertex class". | ||
20609 | */ | ||
20610 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20611 | Type.name(type,"Vertex class"); | ||
20612 | find directInstanceOf(problem,interpretation,element,type); | ||
20613 | } | ||
20614 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20615 | find interpretation(problem,interpretation); | ||
20616 | PartialInterpretation.scopes(interpretation,scope); | ||
20617 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20618 | Scope.maxNewElements(scope,0); | ||
20619 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20620 | Type.name(type,"Vertex class"); | ||
20621 | } | ||
20622 | |||
20623 | /** | ||
20624 | * An element may be an instance of type "Vertex class". | ||
20625 | */ | ||
20626 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20627 | { | ||
20628 | find interpretation(problem,interpretation); | ||
20629 | PartialInterpretation.newElements(interpretation,element); | ||
20630 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20631 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20632 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20633 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20634 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20635 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
20636 | neg find isPrimitive(element); | ||
20637 | } or { | ||
20638 | find interpretation(problem,interpretation); | ||
20639 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20640 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20641 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20642 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20643 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20644 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20645 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
20646 | neg find isPrimitive(element); | ||
20647 | } or | ||
20648 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
20649 | /** | ||
20650 | * An element must be an instance of type "Region class". | ||
20651 | */ | ||
20652 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20653 | Type.name(type,"Region class"); | ||
20654 | find directInstanceOf(problem,interpretation,element,type); | ||
20655 | } | ||
20656 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20657 | find interpretation(problem,interpretation); | ||
20658 | PartialInterpretation.scopes(interpretation,scope); | ||
20659 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20660 | Scope.maxNewElements(scope,0); | ||
20661 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20662 | Type.name(type,"Region class"); | ||
20663 | } | ||
20664 | |||
20665 | /** | ||
20666 | * An element may be an instance of type "Region class". | ||
20667 | */ | ||
20668 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20669 | { | ||
20670 | find interpretation(problem,interpretation); | ||
20671 | PartialInterpretation.newElements(interpretation,element); | ||
20672 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20673 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20674 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20675 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
20676 | neg find isPrimitive(element); | ||
20677 | } or { | ||
20678 | find interpretation(problem,interpretation); | ||
20679 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20680 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20681 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20682 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20683 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
20684 | neg find isPrimitive(element); | ||
20685 | } or | ||
20686 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
20687 | /** | ||
20688 | * An element must be an instance of type "Transition class". | ||
20689 | */ | ||
20690 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20691 | Type.name(type,"Transition class"); | ||
20692 | find directInstanceOf(problem,interpretation,element,type); | ||
20693 | } | ||
20694 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20695 | find interpretation(problem,interpretation); | ||
20696 | PartialInterpretation.scopes(interpretation,scope); | ||
20697 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20698 | Scope.maxNewElements(scope,0); | ||
20699 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20700 | Type.name(type,"Transition class"); | ||
20701 | } | ||
20702 | |||
20703 | /** | ||
20704 | * An element may be an instance of type "Transition class". | ||
20705 | */ | ||
20706 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20707 | { | ||
20708 | find interpretation(problem,interpretation); | ||
20709 | PartialInterpretation.newElements(interpretation,element); | ||
20710 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20711 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20712 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20713 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
20714 | neg find isPrimitive(element); | ||
20715 | } or { | ||
20716 | find interpretation(problem,interpretation); | ||
20717 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20718 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20719 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20720 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20721 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
20722 | neg find isPrimitive(element); | ||
20723 | } or | ||
20724 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
20725 | /** | ||
20726 | * An element must be an instance of type "Statechart class". | ||
20727 | */ | ||
20728 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20729 | Type.name(type,"Statechart class"); | ||
20730 | find directInstanceOf(problem,interpretation,element,type); | ||
20731 | } | ||
20732 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20733 | find interpretation(problem,interpretation); | ||
20734 | PartialInterpretation.scopes(interpretation,scope); | ||
20735 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20736 | Scope.maxNewElements(scope,0); | ||
20737 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20738 | Type.name(type,"Statechart class"); | ||
20739 | } | ||
20740 | |||
20741 | /** | ||
20742 | * An element may be an instance of type "Statechart class". | ||
20743 | */ | ||
20744 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20745 | { | ||
20746 | find interpretation(problem,interpretation); | ||
20747 | PartialInterpretation.newElements(interpretation,element); | ||
20748 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20749 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20750 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
20751 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20752 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
20753 | neg find isPrimitive(element); | ||
20754 | } or { | ||
20755 | find interpretation(problem,interpretation); | ||
20756 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20757 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20758 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20759 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
20760 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20761 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
20762 | neg find isPrimitive(element); | ||
20763 | } or | ||
20764 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
20765 | /** | ||
20766 | * An element must be an instance of type "Entry class". | ||
20767 | */ | ||
20768 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20769 | Type.name(type,"Entry class"); | ||
20770 | find directInstanceOf(problem,interpretation,element,type); | ||
20771 | } | ||
20772 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20773 | find interpretation(problem,interpretation); | ||
20774 | PartialInterpretation.scopes(interpretation,scope); | ||
20775 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20776 | Scope.maxNewElements(scope,0); | ||
20777 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20778 | Type.name(type,"Entry class"); | ||
20779 | } | ||
20780 | |||
20781 | /** | ||
20782 | * An element may be an instance of type "Entry class". | ||
20783 | */ | ||
20784 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20785 | { | ||
20786 | find interpretation(problem,interpretation); | ||
20787 | PartialInterpretation.newElements(interpretation,element); | ||
20788 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20789 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20790 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20791 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20792 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20793 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20794 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20795 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
20796 | neg find isPrimitive(element); | ||
20797 | } or { | ||
20798 | find interpretation(problem,interpretation); | ||
20799 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20800 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20801 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20802 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20803 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20804 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20805 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20806 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20807 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
20808 | neg find isPrimitive(element); | ||
20809 | } or | ||
20810 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
20811 | /** | ||
20812 | * An element must be an instance of type "Synchronization class". | ||
20813 | */ | ||
20814 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20815 | Type.name(type,"Synchronization class"); | ||
20816 | find directInstanceOf(problem,interpretation,element,type); | ||
20817 | } | ||
20818 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20819 | find interpretation(problem,interpretation); | ||
20820 | PartialInterpretation.scopes(interpretation,scope); | ||
20821 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20822 | Scope.maxNewElements(scope,0); | ||
20823 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20824 | Type.name(type,"Synchronization class"); | ||
20825 | } | ||
20826 | |||
20827 | /** | ||
20828 | * An element may be an instance of type "Synchronization class". | ||
20829 | */ | ||
20830 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20831 | { | ||
20832 | find interpretation(problem,interpretation); | ||
20833 | PartialInterpretation.newElements(interpretation,element); | ||
20834 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20835 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20836 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20837 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20838 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20839 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20840 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20841 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
20842 | neg find isPrimitive(element); | ||
20843 | } or { | ||
20844 | find interpretation(problem,interpretation); | ||
20845 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20846 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20847 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20848 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20849 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20850 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20851 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20852 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20853 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
20854 | neg find isPrimitive(element); | ||
20855 | } or | ||
20856 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
20857 | /** | ||
20858 | * An element must be an instance of type "State class". | ||
20859 | */ | ||
20860 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20861 | Type.name(type,"State class"); | ||
20862 | find directInstanceOf(problem,interpretation,element,type); | ||
20863 | } | ||
20864 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20865 | find interpretation(problem,interpretation); | ||
20866 | PartialInterpretation.scopes(interpretation,scope); | ||
20867 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20868 | Scope.maxNewElements(scope,0); | ||
20869 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20870 | Type.name(type,"State class"); | ||
20871 | } | ||
20872 | |||
20873 | /** | ||
20874 | * An element may be an instance of type "State class". | ||
20875 | */ | ||
20876 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20877 | { | ||
20878 | find interpretation(problem,interpretation); | ||
20879 | PartialInterpretation.newElements(interpretation,element); | ||
20880 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20881 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20882 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20883 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
20884 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20885 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
20886 | neg find isPrimitive(element); | ||
20887 | } or { | ||
20888 | find interpretation(problem,interpretation); | ||
20889 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20890 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20891 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20892 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20893 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
20894 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20895 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
20896 | neg find isPrimitive(element); | ||
20897 | } or | ||
20898 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
20899 | /** | ||
20900 | * An element must be an instance of type "RegularState class". | ||
20901 | */ | ||
20902 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20903 | Type.name(type,"RegularState class"); | ||
20904 | find directInstanceOf(problem,interpretation,element,type); | ||
20905 | } | ||
20906 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20907 | find interpretation(problem,interpretation); | ||
20908 | PartialInterpretation.scopes(interpretation,scope); | ||
20909 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20910 | Scope.maxNewElements(scope,0); | ||
20911 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20912 | Type.name(type,"RegularState class"); | ||
20913 | } | ||
20914 | |||
20915 | /** | ||
20916 | * An element may be an instance of type "RegularState class". | ||
20917 | */ | ||
20918 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20919 | { | ||
20920 | find interpretation(problem,interpretation); | ||
20921 | PartialInterpretation.newElements(interpretation,element); | ||
20922 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20923 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20924 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20925 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20926 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20927 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
20928 | neg find isPrimitive(element); | ||
20929 | } or { | ||
20930 | find interpretation(problem,interpretation); | ||
20931 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20932 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20933 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20934 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20935 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20936 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20937 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
20938 | neg find isPrimitive(element); | ||
20939 | } or | ||
20940 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
20941 | /** | ||
20942 | * An element must be an instance of type "CompositeElement class". | ||
20943 | */ | ||
20944 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20945 | Type.name(type,"CompositeElement class"); | ||
20946 | find directInstanceOf(problem,interpretation,element,type); | ||
20947 | } | ||
20948 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20949 | find interpretation(problem,interpretation); | ||
20950 | PartialInterpretation.scopes(interpretation,scope); | ||
20951 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20952 | Scope.maxNewElements(scope,0); | ||
20953 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20954 | Type.name(type,"CompositeElement class"); | ||
20955 | } | ||
20956 | |||
20957 | /** | ||
20958 | * An element may be an instance of type "CompositeElement class". | ||
20959 | */ | ||
20960 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20961 | { | ||
20962 | find interpretation(problem,interpretation); | ||
20963 | PartialInterpretation.newElements(interpretation,element); | ||
20964 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20965 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
20966 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20967 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20968 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
20969 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
20970 | neg find isPrimitive(element); | ||
20971 | } or { | ||
20972 | find interpretation(problem,interpretation); | ||
20973 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20974 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20975 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
20976 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20977 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20978 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
20979 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
20980 | neg find isPrimitive(element); | ||
20981 | } or | ||
20982 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
20983 | /** | ||
20984 | * An element must be an instance of type "Choice class". | ||
20985 | */ | ||
20986 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20987 | Type.name(type,"Choice class"); | ||
20988 | find directInstanceOf(problem,interpretation,element,type); | ||
20989 | } | ||
20990 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20991 | find interpretation(problem,interpretation); | ||
20992 | PartialInterpretation.scopes(interpretation,scope); | ||
20993 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20994 | Scope.maxNewElements(scope,0); | ||
20995 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20996 | Type.name(type,"Choice class"); | ||
20997 | } | ||
20998 | |||
20999 | /** | ||
21000 | * An element may be an instance of type "Choice class". | ||
21001 | */ | ||
21002 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21003 | { | ||
21004 | find interpretation(problem,interpretation); | ||
21005 | PartialInterpretation.newElements(interpretation,element); | ||
21006 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21007 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
21008 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21009 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
21010 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
21011 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
21012 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
21013 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
21014 | neg find isPrimitive(element); | ||
21015 | } or { | ||
21016 | find interpretation(problem,interpretation); | ||
21017 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21018 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21019 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
21020 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21021 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
21022 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
21023 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
21024 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
21025 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
21026 | neg find isPrimitive(element); | ||
21027 | } or | ||
21028 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
21029 | /** | ||
21030 | * An element must be an instance of type "Exit class". | ||
21031 | */ | ||
21032 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21033 | Type.name(type,"Exit class"); | ||
21034 | find directInstanceOf(problem,interpretation,element,type); | ||
21035 | } | ||
21036 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21037 | find interpretation(problem,interpretation); | ||
21038 | PartialInterpretation.scopes(interpretation,scope); | ||
21039 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21040 | Scope.maxNewElements(scope,0); | ||
21041 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21042 | Type.name(type,"Exit class"); | ||
21043 | } | ||
21044 | |||
21045 | /** | ||
21046 | * An element may be an instance of type "Exit class". | ||
21047 | */ | ||
21048 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21049 | { | ||
21050 | find interpretation(problem,interpretation); | ||
21051 | PartialInterpretation.newElements(interpretation,element); | ||
21052 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21053 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
21054 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21055 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
21056 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
21057 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
21058 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
21059 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
21060 | neg find isPrimitive(element); | ||
21061 | } or { | ||
21062 | find interpretation(problem,interpretation); | ||
21063 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21064 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21065 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
21066 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21067 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
21068 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
21069 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
21070 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
21071 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
21072 | neg find isPrimitive(element); | ||
21073 | } or | ||
21074 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
21075 | /** | ||
21076 | * An element must be an instance of type "FinalState class". | ||
21077 | */ | ||
21078 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21079 | Type.name(type,"FinalState class"); | ||
21080 | find directInstanceOf(problem,interpretation,element,type); | ||
21081 | } | ||
21082 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21083 | find interpretation(problem,interpretation); | ||
21084 | PartialInterpretation.scopes(interpretation,scope); | ||
21085 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21086 | Scope.maxNewElements(scope,0); | ||
21087 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21088 | Type.name(type,"FinalState class"); | ||
21089 | } | ||
21090 | |||
21091 | /** | ||
21092 | * An element may be an instance of type "FinalState class". | ||
21093 | */ | ||
21094 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21095 | { | ||
21096 | find interpretation(problem,interpretation); | ||
21097 | PartialInterpretation.newElements(interpretation,element); | ||
21098 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21099 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21100 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
21101 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
21102 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
21103 | neg find isPrimitive(element); | ||
21104 | } or { | ||
21105 | find interpretation(problem,interpretation); | ||
21106 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21107 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21108 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21109 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
21110 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
21111 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
21112 | neg find isPrimitive(element); | ||
21113 | } or | ||
21114 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
21115 | /** | ||
21116 | * An element must be an instance of type "Statechart class DefinedPart". | ||
21117 | */ | ||
21118 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21119 | Type.name(type,"Statechart class DefinedPart"); | ||
21120 | find directInstanceOf(problem,interpretation,element,type); | ||
21121 | } | ||
21122 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21123 | find interpretation(problem,interpretation); | ||
21124 | PartialInterpretation.scopes(interpretation,scope); | ||
21125 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21126 | Scope.maxNewElements(scope,0); | ||
21127 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21128 | Type.name(type,"Statechart class DefinedPart"); | ||
21129 | } | ||
21130 | |||
21131 | /** | ||
21132 | * An element may be an instance of type "Statechart class DefinedPart". | ||
21133 | */ | ||
21134 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21135 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
21136 | /** | ||
21137 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
21138 | */ | ||
21139 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21140 | Type.name(type,"Statechart class UndefinedPart"); | ||
21141 | find directInstanceOf(problem,interpretation,element,type); | ||
21142 | } | ||
21143 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21144 | find interpretation(problem,interpretation); | ||
21145 | PartialInterpretation.scopes(interpretation,scope); | ||
21146 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21147 | Scope.maxNewElements(scope,0); | ||
21148 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21149 | Type.name(type,"Statechart class UndefinedPart"); | ||
21150 | } | ||
21151 | |||
21152 | /** | ||
21153 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
21154 | */ | ||
21155 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21156 | { | ||
21157 | find interpretation(problem,interpretation); | ||
21158 | PartialInterpretation.newElements(interpretation,element); | ||
21159 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21160 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21161 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
21162 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
21163 | neg find isPrimitive(element); | ||
21164 | } or { | ||
21165 | find interpretation(problem,interpretation); | ||
21166 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21167 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21168 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21169 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
21170 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
21171 | neg find isPrimitive(element); | ||
21172 | } or | ||
21173 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
21174 | /** | ||
21175 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
21176 | */ | ||
21177 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21178 | Type.name(type,"CompositeElement class DefinedPart"); | ||
21179 | find directInstanceOf(problem,interpretation,element,type); | ||
21180 | } | ||
21181 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21182 | find interpretation(problem,interpretation); | ||
21183 | PartialInterpretation.scopes(interpretation,scope); | ||
21184 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21185 | Scope.maxNewElements(scope,0); | ||
21186 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21187 | Type.name(type,"CompositeElement class DefinedPart"); | ||
21188 | } | ||
21189 | |||
21190 | /** | ||
21191 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
21192 | */ | ||
21193 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21194 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
21195 | /** | ||
21196 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
21197 | */ | ||
21198 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21199 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
21200 | find directInstanceOf(problem,interpretation,element,type); | ||
21201 | } | ||
21202 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21203 | find interpretation(problem,interpretation); | ||
21204 | PartialInterpretation.scopes(interpretation,scope); | ||
21205 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21206 | Scope.maxNewElements(scope,0); | ||
21207 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21208 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
21209 | } | ||
21210 | |||
21211 | /** | ||
21212 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
21213 | */ | ||
21214 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21215 | { | ||
21216 | find interpretation(problem,interpretation); | ||
21217 | PartialInterpretation.newElements(interpretation,element); | ||
21218 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21219 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21220 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
21221 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
21222 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
21223 | neg find isPrimitive(element); | ||
21224 | } or { | ||
21225 | find interpretation(problem,interpretation); | ||
21226 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21227 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
21228 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
21229 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
21230 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
21231 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
21232 | neg find isPrimitive(element); | ||
21233 | } or | ||
21234 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
21235 | |||
21236 | ////////// | ||
21237 | // 1.2 Relation Declaration Indexers | ||
21238 | ////////// | ||
21239 | /** | ||
21240 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
21241 | */ | ||
21242 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
21243 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21244 | source: DefinedElement, target:DefinedElement) | ||
21245 | { | ||
21246 | find interpretation(problem,interpretation); | ||
21247 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21248 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
21249 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21250 | BinaryElementRelationLink.param1(link,source); | ||
21251 | BinaryElementRelationLink.param2(link,target); | ||
21252 | } | ||
21253 | /** | ||
21254 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
21255 | */ | ||
21256 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
21257 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21258 | source: DefinedElement, target:DefinedElement) | ||
21259 | { | ||
21260 | find interpretation(problem,interpretation); | ||
21261 | // The two endpoint of the link have to exist | ||
21262 | find mayExist(problem, interpretation, source); | ||
21263 | find mayExist(problem, interpretation, target); | ||
21264 | // Type consistency | ||
21265 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
21266 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
21267 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21268 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21269 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
21270 | check(numberOfExistingOppositeReferences < 1); | ||
21271 | } or { | ||
21272 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
21273 | } | ||
21274 | /** | ||
21275 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
21276 | */ | ||
21277 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
21278 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21279 | source: DefinedElement, target:DefinedElement) | ||
21280 | { | ||
21281 | find interpretation(problem,interpretation); | ||
21282 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21283 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
21284 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21285 | BinaryElementRelationLink.param1(link,source); | ||
21286 | BinaryElementRelationLink.param2(link,target); | ||
21287 | } | ||
21288 | /** | ||
21289 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
21290 | */ | ||
21291 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
21292 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21293 | source: DefinedElement, target:DefinedElement) | ||
21294 | { | ||
21295 | find interpretation(problem,interpretation); | ||
21296 | // The two endpoint of the link have to exist | ||
21297 | find mayExist(problem, interpretation, source); | ||
21298 | find mayExist(problem, interpretation, target); | ||
21299 | // Type consistency | ||
21300 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
21301 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
21302 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21303 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21304 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
21305 | check(numberOfExistingOppositeReferences < 1); | ||
21306 | // The reference is containment, then a new reference cannot be create if: | ||
21307 | // 1. Multiple parents | ||
21308 | neg find mustContains4(problem,interpretation,_,target); | ||
21309 | // 2. Circle in the containment hierarchy | ||
21310 | neg find mustTransitiveContains(source,target); | ||
21311 | } or { | ||
21312 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
21313 | } | ||
21314 | /** | ||
21315 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
21316 | */ | ||
21317 | private pattern mustInRelationvertices_reference_Region( | ||
21318 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21319 | source: DefinedElement, target:DefinedElement) | ||
21320 | { | ||
21321 | find interpretation(problem,interpretation); | ||
21322 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21323 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
21324 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21325 | BinaryElementRelationLink.param1(link,source); | ||
21326 | BinaryElementRelationLink.param2(link,target); | ||
21327 | } | ||
21328 | /** | ||
21329 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
21330 | */ | ||
21331 | private pattern mayInRelationvertices_reference_Region( | ||
21332 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21333 | source: DefinedElement, target:DefinedElement) | ||
21334 | { | ||
21335 | find interpretation(problem,interpretation); | ||
21336 | // The two endpoint of the link have to exist | ||
21337 | find mayExist(problem, interpretation, source); | ||
21338 | find mayExist(problem, interpretation, target); | ||
21339 | // Type consistency | ||
21340 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
21341 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
21342 | // The reference is containment, then a new reference cannot be create if: | ||
21343 | // 1. Multiple parents | ||
21344 | neg find mustContains4(problem,interpretation,_,target); | ||
21345 | // 2. Circle in the containment hierarchy | ||
21346 | neg find mustTransitiveContains(source,target); | ||
21347 | } or { | ||
21348 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
21349 | } | ||
21350 | /** | ||
21351 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
21352 | */ | ||
21353 | private pattern mustInRelationtarget_reference_Transition( | ||
21354 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21355 | source: DefinedElement, target:DefinedElement) | ||
21356 | { | ||
21357 | find interpretation(problem,interpretation); | ||
21358 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21359 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
21360 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21361 | BinaryElementRelationLink.param1(link,source); | ||
21362 | BinaryElementRelationLink.param2(link,target); | ||
21363 | } | ||
21364 | /** | ||
21365 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
21366 | */ | ||
21367 | private pattern mayInRelationtarget_reference_Transition( | ||
21368 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21369 | source: DefinedElement, target:DefinedElement) | ||
21370 | { | ||
21371 | find interpretation(problem,interpretation); | ||
21372 | // The two endpoint of the link have to exist | ||
21373 | find mayExist(problem, interpretation, source); | ||
21374 | find mayExist(problem, interpretation, target); | ||
21375 | // Type consistency | ||
21376 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
21377 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
21378 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21379 | // the upper bound of the multiplicity should be considered. | ||
21380 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
21381 | check(numberOfExistingReferences < 1); | ||
21382 | } or { | ||
21383 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
21384 | } | ||
21385 | /** | ||
21386 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
21387 | */ | ||
21388 | private pattern mustInRelationsource_reference_Transition( | ||
21389 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21390 | source: DefinedElement, target:DefinedElement) | ||
21391 | { | ||
21392 | find interpretation(problem,interpretation); | ||
21393 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21394 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
21395 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21396 | BinaryElementRelationLink.param1(link,source); | ||
21397 | BinaryElementRelationLink.param2(link,target); | ||
21398 | } | ||
21399 | /** | ||
21400 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
21401 | */ | ||
21402 | private pattern mayInRelationsource_reference_Transition( | ||
21403 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21404 | source: DefinedElement, target:DefinedElement) | ||
21405 | { | ||
21406 | find interpretation(problem,interpretation); | ||
21407 | // The two endpoint of the link have to exist | ||
21408 | find mayExist(problem, interpretation, source); | ||
21409 | find mayExist(problem, interpretation, target); | ||
21410 | // Type consistency | ||
21411 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
21412 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
21413 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21414 | // the upper bound of the multiplicity should be considered. | ||
21415 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
21416 | check(numberOfExistingReferences < 1); | ||
21417 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
21418 | // 1. Multiple parents | ||
21419 | neg find mustContains4(problem,interpretation,source,_); | ||
21420 | // 2. Circle in the containment hierarchy | ||
21421 | neg find mustTransitiveContains(source,target); | ||
21422 | } or { | ||
21423 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
21424 | } | ||
21425 | /** | ||
21426 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
21427 | */ | ||
21428 | private pattern mustInRelationregions_reference_CompositeElement( | ||
21429 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21430 | source: DefinedElement, target:DefinedElement) | ||
21431 | { | ||
21432 | find interpretation(problem,interpretation); | ||
21433 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21434 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
21435 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21436 | BinaryElementRelationLink.param1(link,source); | ||
21437 | BinaryElementRelationLink.param2(link,target); | ||
21438 | } | ||
21439 | /** | ||
21440 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
21441 | */ | ||
21442 | private pattern mayInRelationregions_reference_CompositeElement( | ||
21443 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21444 | source: DefinedElement, target:DefinedElement) | ||
21445 | { | ||
21446 | find interpretation(problem,interpretation); | ||
21447 | // The two endpoint of the link have to exist | ||
21448 | find mayExist(problem, interpretation, source); | ||
21449 | find mayExist(problem, interpretation, target); | ||
21450 | // Type consistency | ||
21451 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
21452 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
21453 | // The reference is containment, then a new reference cannot be create if: | ||
21454 | // 1. Multiple parents | ||
21455 | neg find mustContains4(problem,interpretation,_,target); | ||
21456 | // 2. Circle in the containment hierarchy | ||
21457 | neg find mustTransitiveContains(source,target); | ||
21458 | } or { | ||
21459 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
21460 | } | ||
21461 | |||
21462 | ////////// | ||
21463 | // 1.3 Relation Definition Indexers | ||
21464 | ////////// | ||
21465 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
21466 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
21467 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21468 | var_r1, var_e1) | ||
21469 | { | ||
21470 | find interpretation(problem,interpretation); | ||
21471 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21472 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
21473 | // r1 is exported | ||
21474 | // e1 is exported | ||
21475 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21476 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
21477 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21478 | var_virtual0 == var_e1; | ||
21479 | } | ||
21480 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
21481 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21482 | var_r1, var_e1) | ||
21483 | { | ||
21484 | find interpretation(problem,interpretation); | ||
21485 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21486 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
21487 | // r1 is exported | ||
21488 | // e1 is exported | ||
21489 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21490 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
21491 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21492 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
21493 | } | ||
21494 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
21495 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21496 | var_r1, var_e1) | ||
21497 | { | ||
21498 | find interpretation(problem,interpretation); | ||
21499 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21500 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
21501 | // r1 is exported | ||
21502 | // e1 is exported | ||
21503 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21504 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
21505 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21506 | var_virtual0 == var_e1; | ||
21507 | } | ||
21508 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
21509 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
21510 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21511 | var_r1) | ||
21512 | { | ||
21513 | find interpretation(problem,interpretation); | ||
21514 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21515 | // r1 is exported | ||
21516 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
21517 | } | ||
21518 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
21519 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21520 | var_r1) | ||
21521 | { | ||
21522 | find interpretation(problem,interpretation); | ||
21523 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21524 | // r1 is exported | ||
21525 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
21526 | } | ||
21527 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
21528 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21529 | var_r1) | ||
21530 | { | ||
21531 | find interpretation(problem,interpretation); | ||
21532 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
21533 | // r1 is exported | ||
21534 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
21535 | } | ||
21536 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
21537 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
21538 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21539 | var_r) | ||
21540 | { | ||
21541 | find interpretation(problem,interpretation); | ||
21542 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
21543 | // r is exported | ||
21544 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
21545 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
21546 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
21547 | } | ||
21548 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
21549 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21550 | var_r) | ||
21551 | { | ||
21552 | find interpretation(problem,interpretation); | ||
21553 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
21554 | // r is exported | ||
21555 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
21556 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
21557 | var_e1 != var_e2; | ||
21558 | } | ||
21559 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
21560 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21561 | var_r) | ||
21562 | { | ||
21563 | find interpretation(problem,interpretation); | ||
21564 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
21565 | // r is exported | ||
21566 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
21567 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
21568 | var_e1 != var_e2; | ||
21569 | } | ||
21570 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
21571 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
21572 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21573 | var_t, var_src, var_trg) | ||
21574 | { | ||
21575 | find interpretation(problem,interpretation); | ||
21576 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21577 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
21578 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
21579 | // t is exported | ||
21580 | // src is exported | ||
21581 | // trg is exported | ||
21582 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21583 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
21584 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21585 | var_virtual0 == var_src; | ||
21586 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21587 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
21588 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
21589 | var_virtual1 == var_trg; | ||
21590 | } | ||
21591 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
21592 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21593 | var_t, var_src, var_trg) | ||
21594 | { | ||
21595 | find interpretation(problem,interpretation); | ||
21596 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
21597 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
21598 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
21599 | // t is exported | ||
21600 | // src is exported | ||
21601 | // trg is exported | ||
21602 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
21603 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
21604 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21605 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
21606 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
21607 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
21608 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
21609 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
21610 | } | ||
21611 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
21612 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21613 | var_t, var_src, var_trg) | ||
21614 | { | ||
21615 | find interpretation(problem,interpretation); | ||
21616 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21617 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
21618 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
21619 | // t is exported | ||
21620 | // src is exported | ||
21621 | // trg is exported | ||
21622 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21623 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
21624 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21625 | var_virtual0 == var_src; | ||
21626 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21627 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
21628 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
21629 | var_virtual1 == var_trg; | ||
21630 | } | ||
21631 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
21632 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
21633 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21634 | var_t, var_e) | ||
21635 | { | ||
21636 | find interpretation(problem,interpretation); | ||
21637 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21638 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21639 | // t is exported | ||
21640 | // e is exported | ||
21641 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
21642 | } | ||
21643 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
21644 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21645 | var_t, var_e) | ||
21646 | { | ||
21647 | find interpretation(problem,interpretation); | ||
21648 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
21649 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
21650 | // t is exported | ||
21651 | // e is exported | ||
21652 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
21653 | } | ||
21654 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
21655 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21656 | var_t, var_e) | ||
21657 | { | ||
21658 | find interpretation(problem,interpretation); | ||
21659 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21660 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21661 | // t is exported | ||
21662 | // e is exported | ||
21663 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
21664 | } | ||
21665 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
21666 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
21667 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21668 | var_e) | ||
21669 | { | ||
21670 | find interpretation(problem,interpretation); | ||
21671 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21672 | // e is exported | ||
21673 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
21674 | } | ||
21675 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
21676 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21677 | var_e) | ||
21678 | { | ||
21679 | find interpretation(problem,interpretation); | ||
21680 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
21681 | // e is exported | ||
21682 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
21683 | } | ||
21684 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
21685 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21686 | var_e) | ||
21687 | { | ||
21688 | find interpretation(problem,interpretation); | ||
21689 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21690 | // e is exported | ||
21691 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
21692 | } | ||
21693 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
21694 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
21695 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21696 | var_e, var_t1, var_t2) | ||
21697 | { | ||
21698 | find interpretation(problem,interpretation); | ||
21699 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21700 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
21701 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
21702 | // e is exported | ||
21703 | // t1 is exported | ||
21704 | // t2 is exported | ||
21705 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21706 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
21707 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21708 | var_virtual0 == var_t1; | ||
21709 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21710 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
21711 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
21712 | var_virtual1 == var_t2; | ||
21713 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
21714 | } | ||
21715 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
21716 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21717 | var_e, var_t1, var_t2) | ||
21718 | { | ||
21719 | find interpretation(problem,interpretation); | ||
21720 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
21721 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
21722 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
21723 | // e is exported | ||
21724 | // t1 is exported | ||
21725 | // t2 is exported | ||
21726 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
21727 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
21728 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21729 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
21730 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
21731 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
21732 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
21733 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
21734 | var_t1 != var_t2; | ||
21735 | } | ||
21736 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
21737 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21738 | var_e, var_t1, var_t2) | ||
21739 | { | ||
21740 | find interpretation(problem,interpretation); | ||
21741 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21742 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
21743 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
21744 | // e is exported | ||
21745 | // t1 is exported | ||
21746 | // t2 is exported | ||
21747 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21748 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
21749 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21750 | var_virtual0 == var_t1; | ||
21751 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
21752 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
21753 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
21754 | var_virtual1 == var_t2; | ||
21755 | var_t1 != var_t2; | ||
21756 | } | ||
21757 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
21758 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
21759 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21760 | var_t, var_e) | ||
21761 | { | ||
21762 | find interpretation(problem,interpretation); | ||
21763 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21764 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
21765 | // t is exported | ||
21766 | // e is exported | ||
21767 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
21768 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
21769 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21770 | var_virtual0 == var_t; | ||
21771 | } | ||
21772 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
21773 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21774 | var_t, var_e) | ||
21775 | { | ||
21776 | find interpretation(problem,interpretation); | ||
21777 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
21778 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
21779 | // t is exported | ||
21780 | // e is exported | ||
21781 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
21782 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
21783 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21784 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
21785 | } | ||
21786 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
21787 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21788 | var_t, var_e) | ||
21789 | { | ||
21790 | find interpretation(problem,interpretation); | ||
21791 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21792 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
21793 | // t is exported | ||
21794 | // e is exported | ||
21795 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
21796 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
21797 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21798 | var_virtual0 == var_t; | ||
21799 | } | ||
21800 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
21801 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
21802 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21803 | var_t, var_f) | ||
21804 | { | ||
21805 | find interpretation(problem,interpretation); | ||
21806 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21807 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
21808 | // t is exported | ||
21809 | // f is exported | ||
21810 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
21811 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
21812 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21813 | var_virtual0 == var_t; | ||
21814 | } | ||
21815 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
21816 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21817 | var_t, var_f) | ||
21818 | { | ||
21819 | find interpretation(problem,interpretation); | ||
21820 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
21821 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
21822 | // t is exported | ||
21823 | // f is exported | ||
21824 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
21825 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
21826 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21827 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
21828 | } | ||
21829 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
21830 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21831 | var_t, var_f) | ||
21832 | { | ||
21833 | find interpretation(problem,interpretation); | ||
21834 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
21835 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
21836 | // t is exported | ||
21837 | // f is exported | ||
21838 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
21839 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
21840 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
21841 | var_virtual0 == var_t; | ||
21842 | } | ||
21843 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
21844 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
21845 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21846 | var_region) | ||
21847 | { | ||
21848 | find interpretation(problem,interpretation); | ||
21849 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
21850 | // region is exported | ||
21851 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
21852 | } | ||
21853 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
21854 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21855 | var_region) | ||
21856 | { | ||
21857 | find interpretation(problem,interpretation); | ||
21858 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
21859 | // region is exported | ||
21860 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
21861 | } | ||
21862 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
21863 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21864 | var_region) | ||
21865 | { | ||
21866 | find interpretation(problem,interpretation); | ||
21867 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
21868 | // region is exported | ||
21869 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
21870 | } | ||
21871 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
21872 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
21873 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21874 | var_region, var_state) | ||
21875 | { | ||
21876 | find interpretation(problem,interpretation); | ||
21877 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
21878 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
21879 | // region is exported | ||
21880 | // state is exported | ||
21881 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
21882 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
21883 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21884 | var_virtual0 == var_state; | ||
21885 | } | ||
21886 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
21887 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21888 | var_region, var_state) | ||
21889 | { | ||
21890 | find interpretation(problem,interpretation); | ||
21891 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
21892 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
21893 | // region is exported | ||
21894 | // state is exported | ||
21895 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
21896 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
21897 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21898 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
21899 | } | ||
21900 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
21901 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21902 | var_region, var_state) | ||
21903 | { | ||
21904 | find interpretation(problem,interpretation); | ||
21905 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
21906 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
21907 | // region is exported | ||
21908 | // state is exported | ||
21909 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
21910 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
21911 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
21912 | var_virtual0 == var_state; | ||
21913 | } | ||
21914 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
21915 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
21916 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21917 | var_c) | ||
21918 | { | ||
21919 | find interpretation(problem,interpretation); | ||
21920 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
21921 | // c is exported | ||
21922 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
21923 | } | ||
21924 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
21925 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21926 | var_c) | ||
21927 | { | ||
21928 | find interpretation(problem,interpretation); | ||
21929 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
21930 | // c is exported | ||
21931 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
21932 | } | ||
21933 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
21934 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21935 | var_c) | ||
21936 | { | ||
21937 | find interpretation(problem,interpretation); | ||
21938 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
21939 | // c is exported | ||
21940 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
21941 | } | ||
21942 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
21943 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
21944 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21945 | var_c) | ||
21946 | { | ||
21947 | find interpretation(problem,interpretation); | ||
21948 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
21949 | // c is exported | ||
21950 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
21951 | } | ||
21952 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
21953 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21954 | var_c) | ||
21955 | { | ||
21956 | find interpretation(problem,interpretation); | ||
21957 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
21958 | // c is exported | ||
21959 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
21960 | } | ||
21961 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
21962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21963 | var_c) | ||
21964 | { | ||
21965 | find interpretation(problem,interpretation); | ||
21966 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
21967 | // c is exported | ||
21968 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
21969 | } | ||
21970 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
21971 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
21972 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21973 | var_s) | ||
21974 | { | ||
21975 | find interpretation(problem,interpretation); | ||
21976 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
21977 | // s is exported | ||
21978 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
21979 | } | ||
21980 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
21981 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21982 | var_s) | ||
21983 | { | ||
21984 | find interpretation(problem,interpretation); | ||
21985 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
21986 | // s is exported | ||
21987 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
21988 | } | ||
21989 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
21990 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21991 | var_s) | ||
21992 | { | ||
21993 | find interpretation(problem,interpretation); | ||
21994 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
21995 | // s is exported | ||
21996 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
21997 | } | ||
21998 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
21999 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
22000 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22001 | var_s) | ||
22002 | { | ||
22003 | find interpretation(problem,interpretation); | ||
22004 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22005 | // s is exported | ||
22006 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
22007 | } | ||
22008 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
22009 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22010 | var_s) | ||
22011 | { | ||
22012 | find interpretation(problem,interpretation); | ||
22013 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22014 | // s is exported | ||
22015 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
22016 | } | ||
22017 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
22018 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22019 | var_s) | ||
22020 | { | ||
22021 | find interpretation(problem,interpretation); | ||
22022 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22023 | // s is exported | ||
22024 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
22025 | } | ||
22026 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
22027 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
22028 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22029 | var_s, var_v1, var_v2) | ||
22030 | { | ||
22031 | find interpretation(problem,interpretation); | ||
22032 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22033 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22034 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22035 | // s is exported | ||
22036 | // v1 is exported | ||
22037 | // v2 is exported | ||
22038 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
22039 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
22040 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
22041 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22042 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
22043 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22044 | var_virtual0 == var_v1; | ||
22045 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22046 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
22047 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22048 | var_virtual1 == var_v2; | ||
22049 | }or{ | ||
22050 | find interpretation(problem,interpretation); | ||
22051 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22052 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22053 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22054 | // s is exported | ||
22055 | // v1 is exported | ||
22056 | // v2 is exported | ||
22057 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
22058 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
22059 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
22060 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22061 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
22062 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22063 | var_virtual0 == var_v1; | ||
22064 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22065 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
22066 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22067 | var_virtual1 == var_v2; | ||
22068 | } | ||
22069 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
22070 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22071 | var_s, var_v1, var_v2) | ||
22072 | { | ||
22073 | find interpretation(problem,interpretation); | ||
22074 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22075 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22076 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22077 | // s is exported | ||
22078 | // v1 is exported | ||
22079 | // v2 is exported | ||
22080 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
22081 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
22082 | var_t1 != var_t2; | ||
22083 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
22084 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
22085 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22086 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
22087 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
22088 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
22089 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22090 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
22091 | }or{ | ||
22092 | find interpretation(problem,interpretation); | ||
22093 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22094 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22095 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22096 | // s is exported | ||
22097 | // v1 is exported | ||
22098 | // v2 is exported | ||
22099 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
22100 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
22101 | var_t1 != var_t2; | ||
22102 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
22103 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
22104 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22105 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
22106 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
22107 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
22108 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22109 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
22110 | } | ||
22111 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
22112 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22113 | var_s, var_v1, var_v2) | ||
22114 | { | ||
22115 | find interpretation(problem,interpretation); | ||
22116 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22117 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22118 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22119 | // s is exported | ||
22120 | // v1 is exported | ||
22121 | // v2 is exported | ||
22122 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
22123 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
22124 | var_t1 != var_t2; | ||
22125 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22126 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
22127 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22128 | var_virtual0 == var_v1; | ||
22129 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22130 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
22131 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22132 | var_virtual1 == var_v2; | ||
22133 | }or{ | ||
22134 | find interpretation(problem,interpretation); | ||
22135 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22136 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22137 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22138 | // s is exported | ||
22139 | // v1 is exported | ||
22140 | // v2 is exported | ||
22141 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
22142 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
22143 | var_t1 != var_t2; | ||
22144 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22145 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
22146 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22147 | var_virtual0 == var_v1; | ||
22148 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
22149 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
22150 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22151 | var_virtual1 == var_v2; | ||
22152 | } | ||
22153 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
22154 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
22155 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22156 | var_s) | ||
22157 | { | ||
22158 | find interpretation(problem,interpretation); | ||
22159 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22160 | // s is exported | ||
22161 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
22162 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
22163 | } | ||
22164 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
22165 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22166 | var_s) | ||
22167 | { | ||
22168 | find interpretation(problem,interpretation); | ||
22169 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22170 | // s is exported | ||
22171 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
22172 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
22173 | } | ||
22174 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
22175 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22176 | var_s) | ||
22177 | { | ||
22178 | find interpretation(problem,interpretation); | ||
22179 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22180 | // s is exported | ||
22181 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
22182 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
22183 | } | ||
22184 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
22185 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
22186 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22187 | var_v) | ||
22188 | { | ||
22189 | find interpretation(problem,interpretation); | ||
22190 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
22191 | // v is exported | ||
22192 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
22193 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
22194 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
22195 | } | ||
22196 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
22197 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22198 | var_v) | ||
22199 | { | ||
22200 | find interpretation(problem,interpretation); | ||
22201 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
22202 | // v is exported | ||
22203 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
22204 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
22205 | var_trg1 != var_trg2; | ||
22206 | } | ||
22207 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
22208 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22209 | var_v) | ||
22210 | { | ||
22211 | find interpretation(problem,interpretation); | ||
22212 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
22213 | // v is exported | ||
22214 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
22215 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
22216 | var_trg1 != var_trg2; | ||
22217 | } | ||
22218 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
22219 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
22220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22221 | var_v) | ||
22222 | { | ||
22223 | find interpretation(problem,interpretation); | ||
22224 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
22225 | // v is exported | ||
22226 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
22227 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
22228 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
22229 | } | ||
22230 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
22231 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22232 | var_v) | ||
22233 | { | ||
22234 | find interpretation(problem,interpretation); | ||
22235 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
22236 | // v is exported | ||
22237 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
22238 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
22239 | var_src1 != var_src2; | ||
22240 | } | ||
22241 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
22242 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22243 | var_v) | ||
22244 | { | ||
22245 | find interpretation(problem,interpretation); | ||
22246 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
22247 | // v is exported | ||
22248 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
22249 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
22250 | var_src1 != var_src2; | ||
22251 | } | ||
22252 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
22253 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
22254 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22255 | var_s, var_v1, var_v2) | ||
22256 | { | ||
22257 | find interpretation(problem,interpretation); | ||
22258 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22259 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22260 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22261 | // s is exported | ||
22262 | // v1 is exported | ||
22263 | // v2 is exported | ||
22264 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
22265 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
22266 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
22267 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
22268 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22269 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22270 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22271 | var_virtual1 == var_v1; | ||
22272 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
22273 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
22274 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
22275 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
22276 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
22277 | var_virtual3 == var_v2; | ||
22278 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
22279 | }or{ | ||
22280 | find interpretation(problem,interpretation); | ||
22281 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22282 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22283 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22284 | // s is exported | ||
22285 | // v1 is exported | ||
22286 | // v2 is exported | ||
22287 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
22288 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
22289 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
22290 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
22291 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22292 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22293 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22294 | var_virtual1 == var_v1; | ||
22295 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
22296 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
22297 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
22298 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
22299 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
22300 | var_virtual3 == var_v2; | ||
22301 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
22302 | } | ||
22303 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
22304 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22305 | var_s, var_v1, var_v2) | ||
22306 | { | ||
22307 | find interpretation(problem,interpretation); | ||
22308 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22309 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22310 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22311 | // s is exported | ||
22312 | // v1 is exported | ||
22313 | // v2 is exported | ||
22314 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
22315 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
22316 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
22317 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
22318 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22319 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22320 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22321 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
22322 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
22323 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
22324 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
22325 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
22326 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
22327 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
22328 | var_r1 != var_r2; | ||
22329 | }or{ | ||
22330 | find interpretation(problem,interpretation); | ||
22331 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22332 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22333 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22334 | // s is exported | ||
22335 | // v1 is exported | ||
22336 | // v2 is exported | ||
22337 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
22338 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
22339 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
22340 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
22341 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22342 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22343 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22344 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
22345 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
22346 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
22347 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
22348 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
22349 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
22350 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
22351 | var_r1 != var_r2; | ||
22352 | } | ||
22353 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
22354 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22355 | var_s, var_v1, var_v2) | ||
22356 | { | ||
22357 | find interpretation(problem,interpretation); | ||
22358 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22359 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22360 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22361 | // s is exported | ||
22362 | // v1 is exported | ||
22363 | // v2 is exported | ||
22364 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
22365 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
22366 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
22367 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
22368 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22369 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22370 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22371 | var_virtual1 == var_v1; | ||
22372 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
22373 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
22374 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
22375 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
22376 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
22377 | var_virtual3 == var_v2; | ||
22378 | var_r1 != var_r2; | ||
22379 | }or{ | ||
22380 | find interpretation(problem,interpretation); | ||
22381 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22382 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
22383 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
22384 | // s is exported | ||
22385 | // v1 is exported | ||
22386 | // v2 is exported | ||
22387 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
22388 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
22389 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
22390 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
22391 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22392 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22393 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22394 | var_virtual1 == var_v1; | ||
22395 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
22396 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
22397 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
22398 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
22399 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
22400 | var_virtual3 == var_v2; | ||
22401 | var_r1 != var_r2; | ||
22402 | } | ||
22403 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
22404 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
22405 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22406 | var_parent, var_child) | ||
22407 | { | ||
22408 | find interpretation(problem,interpretation); | ||
22409 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
22410 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
22411 | // parent is exported | ||
22412 | // child is exported | ||
22413 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
22414 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
22415 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22416 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22417 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22418 | var_virtual1 == var_child; | ||
22419 | } | ||
22420 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
22421 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22422 | var_parent, var_child) | ||
22423 | { | ||
22424 | find interpretation(problem,interpretation); | ||
22425 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
22426 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
22427 | // parent is exported | ||
22428 | // child is exported | ||
22429 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
22430 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
22431 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22432 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22433 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22434 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
22435 | } | ||
22436 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
22437 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22438 | var_parent, var_child) | ||
22439 | { | ||
22440 | find interpretation(problem,interpretation); | ||
22441 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
22442 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
22443 | // parent is exported | ||
22444 | // child is exported | ||
22445 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
22446 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
22447 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22448 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
22449 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22450 | var_virtual1 == var_child; | ||
22451 | } | ||
22452 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
22453 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
22454 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22455 | var_s, var_v) | ||
22456 | { | ||
22457 | find interpretation(problem,interpretation); | ||
22458 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22459 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
22460 | // s is exported | ||
22461 | // v is exported | ||
22462 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
22463 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
22464 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
22465 | }or{ | ||
22466 | find interpretation(problem,interpretation); | ||
22467 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22468 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
22469 | // s is exported | ||
22470 | // v is exported | ||
22471 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
22472 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
22473 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
22474 | } | ||
22475 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
22476 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22477 | var_s, var_v) | ||
22478 | { | ||
22479 | find interpretation(problem,interpretation); | ||
22480 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22481 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
22482 | // s is exported | ||
22483 | // v is exported | ||
22484 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
22485 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
22486 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
22487 | }or{ | ||
22488 | find interpretation(problem,interpretation); | ||
22489 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22490 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
22491 | // s is exported | ||
22492 | // v is exported | ||
22493 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
22494 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
22495 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
22496 | } | ||
22497 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
22498 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22499 | var_s, var_v) | ||
22500 | { | ||
22501 | find interpretation(problem,interpretation); | ||
22502 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22503 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
22504 | // s is exported | ||
22505 | // v is exported | ||
22506 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
22507 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
22508 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
22509 | }or{ | ||
22510 | find interpretation(problem,interpretation); | ||
22511 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22512 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
22513 | // s is exported | ||
22514 | // v is exported | ||
22515 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
22516 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
22517 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
22518 | } | ||
22519 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
22520 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
22521 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22522 | var_composite) | ||
22523 | { | ||
22524 | find interpretation(problem,interpretation); | ||
22525 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22526 | // composite is exported | ||
22527 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22528 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
22529 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22530 | var_virtual0 == var_region1; | ||
22531 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22532 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
22533 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
22534 | var_virtual1 == var_region2; | ||
22535 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
22536 | } | ||
22537 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
22538 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22539 | var_composite) | ||
22540 | { | ||
22541 | find interpretation(problem,interpretation); | ||
22542 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22543 | // composite is exported | ||
22544 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22545 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
22546 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22547 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
22548 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22549 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
22550 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
22551 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
22552 | var_region1 != var_region2; | ||
22553 | } | ||
22554 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
22555 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22556 | var_composite) | ||
22557 | { | ||
22558 | find interpretation(problem,interpretation); | ||
22559 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22560 | // composite is exported | ||
22561 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22562 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
22563 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
22564 | var_virtual0 == var_region1; | ||
22565 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
22566 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
22567 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
22568 | var_virtual1 == var_region2; | ||
22569 | var_region1 != var_region2; | ||
22570 | } | ||
22571 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
22572 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
22573 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22574 | var_s) | ||
22575 | { | ||
22576 | find interpretation(problem,interpretation); | ||
22577 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22578 | // s is exported | ||
22579 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
22580 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
22581 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22582 | var_virtual0 == var_s; | ||
22583 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
22584 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
22585 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22586 | var_virtual1 == var_s; | ||
22587 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
22588 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
22589 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
22590 | var_virtual2 == var_s; | ||
22591 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
22592 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
22593 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
22594 | }or{ | ||
22595 | find interpretation(problem,interpretation); | ||
22596 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22597 | // s is exported | ||
22598 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
22599 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
22600 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22601 | var_virtual0 == var_s; | ||
22602 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
22603 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
22604 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22605 | var_virtual1 == var_s; | ||
22606 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
22607 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
22608 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
22609 | var_virtual2 == var_s; | ||
22610 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
22611 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
22612 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
22613 | } | ||
22614 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
22615 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22616 | var_s) | ||
22617 | { | ||
22618 | find interpretation(problem,interpretation); | ||
22619 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22620 | // s is exported | ||
22621 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
22622 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
22623 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22624 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
22625 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
22626 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
22627 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22628 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
22629 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
22630 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
22631 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
22632 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
22633 | var_t1 != var_t2; | ||
22634 | var_t2 != var_t3; | ||
22635 | var_t1 != var_t3; | ||
22636 | }or{ | ||
22637 | find interpretation(problem,interpretation); | ||
22638 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22639 | // s is exported | ||
22640 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
22641 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
22642 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22643 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
22644 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
22645 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
22646 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22647 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
22648 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
22649 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
22650 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
22651 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
22652 | var_t1 != var_t2; | ||
22653 | var_t2 != var_t3; | ||
22654 | var_t1 != var_t3; | ||
22655 | } | ||
22656 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
22657 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22658 | var_s) | ||
22659 | { | ||
22660 | find interpretation(problem,interpretation); | ||
22661 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22662 | // s is exported | ||
22663 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
22664 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
22665 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22666 | var_virtual0 == var_s; | ||
22667 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
22668 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
22669 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22670 | var_virtual1 == var_s; | ||
22671 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
22672 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
22673 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
22674 | var_virtual2 == var_s; | ||
22675 | var_t1 != var_t2; | ||
22676 | var_t2 != var_t3; | ||
22677 | var_t1 != var_t3; | ||
22678 | }or{ | ||
22679 | find interpretation(problem,interpretation); | ||
22680 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
22681 | // s is exported | ||
22682 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
22683 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
22684 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
22685 | var_virtual0 == var_s; | ||
22686 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
22687 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
22688 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
22689 | var_virtual1 == var_s; | ||
22690 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
22691 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
22692 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
22693 | var_virtual2 == var_s; | ||
22694 | var_t1 != var_t2; | ||
22695 | var_t2 != var_t3; | ||
22696 | var_t1 != var_t3; | ||
22697 | } | ||
22698 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
22699 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
22700 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22701 | var_s1, var_s2) | ||
22702 | { | ||
22703 | find interpretation(problem,interpretation); | ||
22704 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
22705 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
22706 | // s1 is exported | ||
22707 | // s2 is exported | ||
22708 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
22709 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
22710 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
22711 | } | ||
22712 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
22713 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22714 | var_s1, var_s2) | ||
22715 | { | ||
22716 | find interpretation(problem,interpretation); | ||
22717 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
22718 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
22719 | // s1 is exported | ||
22720 | // s2 is exported | ||
22721 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
22722 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
22723 | var_s1 != var_s2; | ||
22724 | } | ||
22725 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
22726 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22727 | var_s1, var_s2) | ||
22728 | { | ||
22729 | find interpretation(problem,interpretation); | ||
22730 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
22731 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
22732 | // s1 is exported | ||
22733 | // s2 is exported | ||
22734 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
22735 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
22736 | var_s1 != var_s2; | ||
22737 | } | ||
22738 | |||
22739 | ////////// | ||
22740 | // 1.4 Containment Indexer | ||
22741 | ////////// | ||
22742 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
22743 | find mustContains4(_,_,source,target); | ||
22744 | } | ||
22745 | |||
22746 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22747 | source: DefinedElement, target: DefinedElement) | ||
22748 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
22749 | |||
22750 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
22751 | |||
22752 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
22753 | |||
22754 | private pattern mustTransitiveContains(source,target) { | ||
22755 | find mustContains2+(source,target); | ||
22756 | } | ||
22757 | |||
22758 | ////////// | ||
22759 | // 2. Invalidation Indexers | ||
22760 | ////////// | ||
22761 | // 2.1 Invalidated by WF Queries | ||
22762 | ////////// | ||
22763 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22764 | var_r1) | ||
22765 | { | ||
22766 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
22767 | } | ||
22768 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22769 | var_r) | ||
22770 | { | ||
22771 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
22772 | } | ||
22773 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22774 | var_t, var_e) | ||
22775 | { | ||
22776 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
22777 | } | ||
22778 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22779 | var_e) | ||
22780 | { | ||
22781 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
22782 | } | ||
22783 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22784 | var_e, var_t1, var_t2) | ||
22785 | { | ||
22786 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
22787 | } | ||
22788 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22789 | var_t, var_e) | ||
22790 | { | ||
22791 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
22792 | } | ||
22793 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22794 | var_t, var_f) | ||
22795 | { | ||
22796 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
22797 | } | ||
22798 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22799 | var_region) | ||
22800 | { | ||
22801 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
22802 | } | ||
22803 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22804 | var_c) | ||
22805 | { | ||
22806 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
22807 | } | ||
22808 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22809 | var_c) | ||
22810 | { | ||
22811 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
22812 | } | ||
22813 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22814 | var_s) | ||
22815 | { | ||
22816 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
22817 | } | ||
22818 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22819 | var_s) | ||
22820 | { | ||
22821 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
22822 | } | ||
22823 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22824 | var_s, var_v1, var_v2) | ||
22825 | { | ||
22826 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
22827 | } | ||
22828 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22829 | var_s) | ||
22830 | { | ||
22831 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
22832 | } | ||
22833 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22834 | var_s, var_v1, var_v2) | ||
22835 | { | ||
22836 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
22837 | } | ||
22838 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22839 | var_s, var_v) | ||
22840 | { | ||
22841 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
22842 | } | ||
22843 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22844 | var_s) | ||
22845 | { | ||
22846 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
22847 | } | ||
22848 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22849 | var_s1, var_s2) | ||
22850 | { | ||
22851 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
22852 | } | ||
22853 | |||
22854 | ////////// | ||
22855 | // 3. Unfinishedness Indexers | ||
22856 | ////////// | ||
22857 | // 3.1 Unfinishedness Measured by Multiplicity | ||
22858 | ////////// | ||
22859 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
22860 | find interpretation(problem,interpretation); | ||
22861 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22862 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
22863 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
22864 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
22865 | check(numberOfExistingReferences < 1); | ||
22866 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
22867 | } | ||
22868 | |||
22869 | ////////// | ||
22870 | // 3.2 Unfinishedness Measured by WF Queries | ||
22871 | ////////// | ||
22872 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22873 | var_r1) | ||
22874 | { | ||
22875 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
22876 | } | ||
22877 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22878 | var_r) | ||
22879 | { | ||
22880 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
22881 | } | ||
22882 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22883 | var_t, var_e) | ||
22884 | { | ||
22885 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
22886 | } | ||
22887 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22888 | var_e) | ||
22889 | { | ||
22890 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
22891 | } | ||
22892 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22893 | var_e, var_t1, var_t2) | ||
22894 | { | ||
22895 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
22896 | } | ||
22897 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22898 | var_t, var_e) | ||
22899 | { | ||
22900 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
22901 | } | ||
22902 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22903 | var_t, var_f) | ||
22904 | { | ||
22905 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
22906 | } | ||
22907 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22908 | var_region) | ||
22909 | { | ||
22910 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
22911 | } | ||
22912 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22913 | var_c) | ||
22914 | { | ||
22915 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
22916 | } | ||
22917 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22918 | var_c) | ||
22919 | { | ||
22920 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
22921 | } | ||
22922 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22923 | var_s) | ||
22924 | { | ||
22925 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
22926 | } | ||
22927 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22928 | var_s) | ||
22929 | { | ||
22930 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
22931 | } | ||
22932 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22933 | var_s, var_v1, var_v2) | ||
22934 | { | ||
22935 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
22936 | } | ||
22937 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22938 | var_s) | ||
22939 | { | ||
22940 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
22941 | } | ||
22942 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22943 | var_s, var_v1, var_v2) | ||
22944 | { | ||
22945 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
22946 | } | ||
22947 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22948 | var_s, var_v) | ||
22949 | { | ||
22950 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
22951 | } | ||
22952 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22953 | var_s) | ||
22954 | { | ||
22955 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
22956 | } | ||
22957 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22958 | var_s1, var_s2) | ||
22959 | { | ||
22960 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
22961 | } | ||
22962 | |||
22963 | ////////// | ||
22964 | // 4. Refinement Indexers | ||
22965 | ////////// | ||
22966 | // 4.1 Object constructors | ||
22967 | ////////// | ||
22968 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
22969 | { | ||
22970 | find interpretation(problem,interpretation); | ||
22971 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
22972 | find mustExist(problem, interpretation, root); | ||
22973 | }or{ | ||
22974 | find interpretation(problem,interpretation); | ||
22975 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
22976 | find mustExist(problem, interpretation, root); | ||
22977 | }or{ | ||
22978 | find interpretation(problem,interpretation); | ||
22979 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
22980 | find mustExist(problem, interpretation, root); | ||
22981 | }or{ | ||
22982 | find interpretation(problem,interpretation); | ||
22983 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
22984 | find mustExist(problem, interpretation, root); | ||
22985 | }or{ | ||
22986 | find interpretation(problem,interpretation); | ||
22987 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
22988 | find mustExist(problem, interpretation, root); | ||
22989 | }or{ | ||
22990 | find interpretation(problem,interpretation); | ||
22991 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
22992 | find mustExist(problem, interpretation, root); | ||
22993 | }or{ | ||
22994 | find interpretation(problem,interpretation); | ||
22995 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
22996 | find mustExist(problem, interpretation, root); | ||
22997 | }or{ | ||
22998 | find interpretation(problem,interpretation); | ||
22999 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
23000 | find mustExist(problem, interpretation, root); | ||
23001 | }or{ | ||
23002 | find interpretation(problem,interpretation); | ||
23003 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
23004 | find mustExist(problem, interpretation, root); | ||
23005 | }or{ | ||
23006 | find interpretation(problem,interpretation); | ||
23007 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
23008 | find mustExist(problem, interpretation, root); | ||
23009 | }or{ | ||
23010 | find interpretation(problem,interpretation); | ||
23011 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
23012 | find mustExist(problem, interpretation, root); | ||
23013 | }or{ | ||
23014 | find interpretation(problem,interpretation); | ||
23015 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
23016 | find mustExist(problem, interpretation, root); | ||
23017 | }or{ | ||
23018 | find interpretation(problem,interpretation); | ||
23019 | find mustInstanceOfState_class(problem,interpretation,root); | ||
23020 | find mustExist(problem, interpretation, root); | ||
23021 | }or{ | ||
23022 | find interpretation(problem,interpretation); | ||
23023 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
23024 | find mustExist(problem, interpretation, root); | ||
23025 | }or{ | ||
23026 | find interpretation(problem,interpretation); | ||
23027 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
23028 | find mustExist(problem, interpretation, root); | ||
23029 | }or{ | ||
23030 | find interpretation(problem,interpretation); | ||
23031 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
23032 | find mustExist(problem, interpretation, root); | ||
23033 | }or{ | ||
23034 | find interpretation(problem,interpretation); | ||
23035 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
23036 | find mustExist(problem, interpretation, root); | ||
23037 | } | ||
23038 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
23039 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23040 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23041 | container:DefinedElement) | ||
23042 | { | ||
23043 | find interpretation(problem,interpretation); | ||
23044 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23045 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
23046 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23047 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
23048 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
23049 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
23050 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
23051 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
23052 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
23053 | find mustExist(problem, interpretation, container); | ||
23054 | neg find mustExist(problem, interpretation, newObject); | ||
23055 | } | ||
23056 | pattern createObject_Transition_class( | ||
23057 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23058 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23059 | { | ||
23060 | find interpretation(problem,interpretation); | ||
23061 | neg find hasElementInContainment(problem,interpretation); | ||
23062 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23063 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
23064 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
23065 | find mayExist(problem, interpretation, newObject); | ||
23066 | neg find mustExist(problem, interpretation, newObject); | ||
23067 | } | ||
23068 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
23069 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23070 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23071 | container:DefinedElement) | ||
23072 | { | ||
23073 | find interpretation(problem,interpretation); | ||
23074 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23075 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
23076 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23077 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
23078 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
23079 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
23080 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
23081 | find mustExist(problem, interpretation, container); | ||
23082 | neg find mustExist(problem, interpretation, newObject); | ||
23083 | } | ||
23084 | pattern createObject_Entry_class( | ||
23085 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23086 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23087 | { | ||
23088 | find interpretation(problem,interpretation); | ||
23089 | neg find hasElementInContainment(problem,interpretation); | ||
23090 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23091 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
23092 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
23093 | find mayExist(problem, interpretation, newObject); | ||
23094 | neg find mustExist(problem, interpretation, newObject); | ||
23095 | } | ||
23096 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
23097 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23098 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23099 | container:DefinedElement) | ||
23100 | { | ||
23101 | find interpretation(problem,interpretation); | ||
23102 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23103 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
23104 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23105 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
23106 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
23107 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
23108 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
23109 | find mustExist(problem, interpretation, container); | ||
23110 | neg find mustExist(problem, interpretation, newObject); | ||
23111 | } | ||
23112 | pattern createObject_Region_class( | ||
23113 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23114 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23115 | { | ||
23116 | find interpretation(problem,interpretation); | ||
23117 | neg find hasElementInContainment(problem,interpretation); | ||
23118 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23119 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
23120 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
23121 | find mayExist(problem, interpretation, newObject); | ||
23122 | neg find mustExist(problem, interpretation, newObject); | ||
23123 | } | ||
23124 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
23125 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23126 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23127 | container:DefinedElement) | ||
23128 | { | ||
23129 | find interpretation(problem,interpretation); | ||
23130 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23131 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
23132 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23133 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
23134 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
23135 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
23136 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
23137 | find mustExist(problem, interpretation, container); | ||
23138 | neg find mustExist(problem, interpretation, newObject); | ||
23139 | } | ||
23140 | pattern createObject_FinalState_class( | ||
23141 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23142 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23143 | { | ||
23144 | find interpretation(problem,interpretation); | ||
23145 | neg find hasElementInContainment(problem,interpretation); | ||
23146 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23147 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
23148 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
23149 | find mayExist(problem, interpretation, newObject); | ||
23150 | neg find mustExist(problem, interpretation, newObject); | ||
23151 | } | ||
23152 | pattern createObject_State_class_by_vertices_reference_Region( | ||
23153 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23154 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23155 | container:DefinedElement) | ||
23156 | { | ||
23157 | find interpretation(problem,interpretation); | ||
23158 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23159 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
23160 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23161 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
23162 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
23163 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
23164 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
23165 | find mustExist(problem, interpretation, container); | ||
23166 | neg find mustExist(problem, interpretation, newObject); | ||
23167 | } | ||
23168 | pattern createObject_State_class( | ||
23169 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23170 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23171 | { | ||
23172 | find interpretation(problem,interpretation); | ||
23173 | neg find hasElementInContainment(problem,interpretation); | ||
23174 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23175 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
23176 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
23177 | find mayExist(problem, interpretation, newObject); | ||
23178 | neg find mustExist(problem, interpretation, newObject); | ||
23179 | } | ||
23180 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
23181 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23182 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23183 | container:DefinedElement) | ||
23184 | { | ||
23185 | find interpretation(problem,interpretation); | ||
23186 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23187 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
23188 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23189 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
23190 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
23191 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
23192 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
23193 | find mustExist(problem, interpretation, container); | ||
23194 | neg find mustExist(problem, interpretation, newObject); | ||
23195 | } | ||
23196 | pattern createObject_Choice_class( | ||
23197 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23198 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23199 | { | ||
23200 | find interpretation(problem,interpretation); | ||
23201 | neg find hasElementInContainment(problem,interpretation); | ||
23202 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23203 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
23204 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
23205 | find mayExist(problem, interpretation, newObject); | ||
23206 | neg find mustExist(problem, interpretation, newObject); | ||
23207 | } | ||
23208 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
23209 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23210 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23211 | container:DefinedElement) | ||
23212 | { | ||
23213 | find interpretation(problem,interpretation); | ||
23214 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23215 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
23216 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23217 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
23218 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
23219 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
23220 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
23221 | find mustExist(problem, interpretation, container); | ||
23222 | neg find mustExist(problem, interpretation, newObject); | ||
23223 | } | ||
23224 | pattern createObject_Synchronization_class( | ||
23225 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23226 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23227 | { | ||
23228 | find interpretation(problem,interpretation); | ||
23229 | neg find hasElementInContainment(problem,interpretation); | ||
23230 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23231 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
23232 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
23233 | find mayExist(problem, interpretation, newObject); | ||
23234 | neg find mustExist(problem, interpretation, newObject); | ||
23235 | } | ||
23236 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
23237 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23238 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23239 | container:DefinedElement) | ||
23240 | { | ||
23241 | find interpretation(problem,interpretation); | ||
23242 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23243 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
23244 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23245 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
23246 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
23247 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
23248 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
23249 | find mustExist(problem, interpretation, container); | ||
23250 | neg find mustExist(problem, interpretation, newObject); | ||
23251 | } | ||
23252 | pattern createObject_Exit_class( | ||
23253 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23254 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23255 | { | ||
23256 | find interpretation(problem,interpretation); | ||
23257 | neg find hasElementInContainment(problem,interpretation); | ||
23258 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23259 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
23260 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
23261 | find mayExist(problem, interpretation, newObject); | ||
23262 | neg find mustExist(problem, interpretation, newObject); | ||
23263 | } | ||
23264 | pattern createObject_Statechart_class_UndefinedPart( | ||
23265 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23266 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23267 | { | ||
23268 | find interpretation(problem,interpretation); | ||
23269 | neg find hasElementInContainment(problem,interpretation); | ||
23270 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23271 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
23272 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
23273 | find mayExist(problem, interpretation, newObject); | ||
23274 | neg find mustExist(problem, interpretation, newObject); | ||
23275 | } | ||
23276 | |||
23277 | ////////// | ||
23278 | // 4.2 Type refinement | ||
23279 | ////////// | ||
23280 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23281 | find interpretation(problem,interpretation); | ||
23282 | PartialInterpretation.newElements(interpretation,element); | ||
23283 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
23284 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23285 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23286 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23287 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23288 | } | ||
23289 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23290 | find interpretation(problem,interpretation); | ||
23291 | PartialInterpretation.newElements(interpretation,element); | ||
23292 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
23293 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23294 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23295 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23296 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23297 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23298 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23299 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23300 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23301 | } | ||
23302 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23303 | find interpretation(problem,interpretation); | ||
23304 | PartialInterpretation.newElements(interpretation,element); | ||
23305 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
23306 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23307 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23308 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23309 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23310 | } | ||
23311 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23312 | find interpretation(problem,interpretation); | ||
23313 | PartialInterpretation.newElements(interpretation,element); | ||
23314 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
23315 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23316 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23317 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
23318 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23319 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23320 | } | ||
23321 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23322 | find interpretation(problem,interpretation); | ||
23323 | PartialInterpretation.newElements(interpretation,element); | ||
23324 | find mayInstanceOfState_class(problem,interpretation,element); | ||
23325 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23326 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23327 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
23328 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
23329 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
23330 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23331 | } | ||
23332 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23333 | find interpretation(problem,interpretation); | ||
23334 | PartialInterpretation.newElements(interpretation,element); | ||
23335 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
23336 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23337 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23338 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23339 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23340 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23341 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23342 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23343 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23344 | } | ||
23345 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23346 | find interpretation(problem,interpretation); | ||
23347 | PartialInterpretation.newElements(interpretation,element); | ||
23348 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
23349 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23350 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23351 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23352 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23353 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23354 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23355 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23356 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23357 | } | ||
23358 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23359 | find interpretation(problem,interpretation); | ||
23360 | PartialInterpretation.newElements(interpretation,element); | ||
23361 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
23362 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23363 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23364 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23365 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23366 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23367 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23368 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23369 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23370 | } | ||
23371 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23372 | find interpretation(problem,interpretation); | ||
23373 | PartialInterpretation.newElements(interpretation,element); | ||
23374 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
23375 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23376 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23377 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23378 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
23379 | } | ||
23380 | |||
23381 | ////////// | ||
23382 | // 4.3 Relation refinement | ||
23383 | ////////// | ||
23384 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
23385 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23386 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
23387 | from: DefinedElement, to: DefinedElement) | ||
23388 | { | ||
23389 | find interpretation(problem,interpretation); | ||
23390 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23391 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
23392 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
23393 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
23394 | find mustExist(problem, interpretation, from); | ||
23395 | find mustExist(problem, interpretation, to); | ||
23396 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
23397 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
23398 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
23399 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
23400 | } | ||
23401 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
23402 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
23403 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
23404 | |||
23405 | ////////// | ||
23406 | // 0. Util | ||
23407 | ////////// | ||
23408 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23409 | PartialInterpretation.problem(interpretation,problem); | ||
23410 | } | ||
23411 | |||
23412 | ///////////////////////// | ||
23413 | // 0.1 Existence | ||
23414 | ///////////////////////// | ||
23415 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23416 | find interpretation(problem,interpretation); | ||
23417 | LogicProblem.elements(problem,element); | ||
23418 | } or { | ||
23419 | find interpretation(problem,interpretation); | ||
23420 | PartialInterpretation.newElements(interpretation,element); | ||
23421 | } | ||
23422 | |||
23423 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23424 | find mustExist(problem,interpretation,element); | ||
23425 | } or { | ||
23426 | find interpretation(problem,interpretation); | ||
23427 | neg find elementCloseWorld(element); | ||
23428 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23429 | } | ||
23430 | |||
23431 | private pattern elementCloseWorld(element:DefinedElement) { | ||
23432 | PartialInterpretation.openWorldElements(i,element); | ||
23433 | PartialInterpretation.maxNewElements(i,0); | ||
23434 | } or { | ||
23435 | Scope.targetTypeInterpretation(scope,interpretation); | ||
23436 | PartialTypeInterpratation.elements(interpretation,element); | ||
23437 | Scope.maxNewElements(scope,0); | ||
23438 | } | ||
23439 | |||
23440 | //////////////////////// | ||
23441 | // 0.2 Equivalence | ||
23442 | //////////////////////// | ||
23443 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
23444 | find mayExist(problem,interpretation,a); | ||
23445 | find mayExist(problem,interpretation,b); | ||
23446 | a == b; | ||
23447 | } | ||
23448 | |||
23449 | //////////////////////// | ||
23450 | // 0.3 Required Patterns by TypeIndexer | ||
23451 | //////////////////////// | ||
23452 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
23453 | find interpretation(problem,interpretation); | ||
23454 | LogicProblem.types(problem,type); | ||
23455 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23456 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23457 | } | ||
23458 | |||
23459 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
23460 | find interpretation(problem,interpretation); | ||
23461 | LogicProblem.types(problem,type); | ||
23462 | TypeDefinition.elements(type,element); | ||
23463 | } or { | ||
23464 | find interpretation(problem,interpretation); | ||
23465 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
23466 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
23467 | } | ||
23468 | |||
23469 | private pattern isPrimitive(element: PrimitiveElement) { | ||
23470 | PrimitiveElement(element); | ||
23471 | } | ||
23472 | |||
23473 | ////////// | ||
23474 | // 1. Problem-Specific Base Indexers | ||
23475 | ////////// | ||
23476 | // 1.1 Type Indexers | ||
23477 | ////////// | ||
23478 | // 1.1.1 primitive Type Indexers | ||
23479 | ////////// | ||
23480 | |||
23481 | ////////// | ||
23482 | // 1.1.2 domain-specific Type Indexers | ||
23483 | ////////// | ||
23484 | /** | ||
23485 | * An element must be an instance of type "Pseudostate class". | ||
23486 | */ | ||
23487 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23488 | Type.name(type,"Pseudostate class"); | ||
23489 | find directInstanceOf(problem,interpretation,element,type); | ||
23490 | } | ||
23491 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23492 | find interpretation(problem,interpretation); | ||
23493 | PartialInterpretation.scopes(interpretation,scope); | ||
23494 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23495 | Scope.maxNewElements(scope,0); | ||
23496 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23497 | Type.name(type,"Pseudostate class"); | ||
23498 | } | ||
23499 | |||
23500 | /** | ||
23501 | * An element may be an instance of type "Pseudostate class". | ||
23502 | */ | ||
23503 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23504 | { | ||
23505 | find interpretation(problem,interpretation); | ||
23506 | PartialInterpretation.newElements(interpretation,element); | ||
23507 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23508 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23509 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23510 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23511 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23512 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23513 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23514 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23515 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
23516 | neg find isPrimitive(element); | ||
23517 | } or { | ||
23518 | find interpretation(problem,interpretation); | ||
23519 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23520 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23521 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23522 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23523 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23524 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23525 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23526 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23527 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23528 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
23529 | neg find isPrimitive(element); | ||
23530 | } or | ||
23531 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
23532 | /** | ||
23533 | * An element must be an instance of type "Vertex class". | ||
23534 | */ | ||
23535 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23536 | Type.name(type,"Vertex class"); | ||
23537 | find directInstanceOf(problem,interpretation,element,type); | ||
23538 | } | ||
23539 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23540 | find interpretation(problem,interpretation); | ||
23541 | PartialInterpretation.scopes(interpretation,scope); | ||
23542 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23543 | Scope.maxNewElements(scope,0); | ||
23544 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23545 | Type.name(type,"Vertex class"); | ||
23546 | } | ||
23547 | |||
23548 | /** | ||
23549 | * An element may be an instance of type "Vertex class". | ||
23550 | */ | ||
23551 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23552 | { | ||
23553 | find interpretation(problem,interpretation); | ||
23554 | PartialInterpretation.newElements(interpretation,element); | ||
23555 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23556 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23557 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23558 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23559 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23560 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
23561 | neg find isPrimitive(element); | ||
23562 | } or { | ||
23563 | find interpretation(problem,interpretation); | ||
23564 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23565 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23566 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23567 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23568 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23569 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23570 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
23571 | neg find isPrimitive(element); | ||
23572 | } or | ||
23573 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
23574 | /** | ||
23575 | * An element must be an instance of type "Region class". | ||
23576 | */ | ||
23577 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23578 | Type.name(type,"Region class"); | ||
23579 | find directInstanceOf(problem,interpretation,element,type); | ||
23580 | } | ||
23581 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23582 | find interpretation(problem,interpretation); | ||
23583 | PartialInterpretation.scopes(interpretation,scope); | ||
23584 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23585 | Scope.maxNewElements(scope,0); | ||
23586 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23587 | Type.name(type,"Region class"); | ||
23588 | } | ||
23589 | |||
23590 | /** | ||
23591 | * An element may be an instance of type "Region class". | ||
23592 | */ | ||
23593 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23594 | { | ||
23595 | find interpretation(problem,interpretation); | ||
23596 | PartialInterpretation.newElements(interpretation,element); | ||
23597 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23598 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23599 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23600 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
23601 | neg find isPrimitive(element); | ||
23602 | } or { | ||
23603 | find interpretation(problem,interpretation); | ||
23604 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23605 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23606 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23607 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23608 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
23609 | neg find isPrimitive(element); | ||
23610 | } or | ||
23611 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
23612 | /** | ||
23613 | * An element must be an instance of type "Transition class". | ||
23614 | */ | ||
23615 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23616 | Type.name(type,"Transition class"); | ||
23617 | find directInstanceOf(problem,interpretation,element,type); | ||
23618 | } | ||
23619 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23620 | find interpretation(problem,interpretation); | ||
23621 | PartialInterpretation.scopes(interpretation,scope); | ||
23622 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23623 | Scope.maxNewElements(scope,0); | ||
23624 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23625 | Type.name(type,"Transition class"); | ||
23626 | } | ||
23627 | |||
23628 | /** | ||
23629 | * An element may be an instance of type "Transition class". | ||
23630 | */ | ||
23631 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23632 | { | ||
23633 | find interpretation(problem,interpretation); | ||
23634 | PartialInterpretation.newElements(interpretation,element); | ||
23635 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23636 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23637 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23638 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
23639 | neg find isPrimitive(element); | ||
23640 | } or { | ||
23641 | find interpretation(problem,interpretation); | ||
23642 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23643 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23644 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23645 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23646 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
23647 | neg find isPrimitive(element); | ||
23648 | } or | ||
23649 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
23650 | /** | ||
23651 | * An element must be an instance of type "Statechart class". | ||
23652 | */ | ||
23653 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23654 | Type.name(type,"Statechart class"); | ||
23655 | find directInstanceOf(problem,interpretation,element,type); | ||
23656 | } | ||
23657 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23658 | find interpretation(problem,interpretation); | ||
23659 | PartialInterpretation.scopes(interpretation,scope); | ||
23660 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23661 | Scope.maxNewElements(scope,0); | ||
23662 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23663 | Type.name(type,"Statechart class"); | ||
23664 | } | ||
23665 | |||
23666 | /** | ||
23667 | * An element may be an instance of type "Statechart class". | ||
23668 | */ | ||
23669 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23670 | { | ||
23671 | find interpretation(problem,interpretation); | ||
23672 | PartialInterpretation.newElements(interpretation,element); | ||
23673 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
23674 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23675 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23676 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23677 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
23678 | neg find isPrimitive(element); | ||
23679 | } or { | ||
23680 | find interpretation(problem,interpretation); | ||
23681 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23682 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
23683 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23684 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23685 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23686 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
23687 | neg find isPrimitive(element); | ||
23688 | } or | ||
23689 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
23690 | /** | ||
23691 | * An element must be an instance of type "Entry class". | ||
23692 | */ | ||
23693 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23694 | Type.name(type,"Entry class"); | ||
23695 | find directInstanceOf(problem,interpretation,element,type); | ||
23696 | } | ||
23697 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23698 | find interpretation(problem,interpretation); | ||
23699 | PartialInterpretation.scopes(interpretation,scope); | ||
23700 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23701 | Scope.maxNewElements(scope,0); | ||
23702 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23703 | Type.name(type,"Entry class"); | ||
23704 | } | ||
23705 | |||
23706 | /** | ||
23707 | * An element may be an instance of type "Entry class". | ||
23708 | */ | ||
23709 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23710 | { | ||
23711 | find interpretation(problem,interpretation); | ||
23712 | PartialInterpretation.newElements(interpretation,element); | ||
23713 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23714 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23715 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23716 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23717 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23718 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23719 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23720 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
23721 | neg find isPrimitive(element); | ||
23722 | } or { | ||
23723 | find interpretation(problem,interpretation); | ||
23724 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23725 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23726 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23727 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23728 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23729 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23730 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23731 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23732 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
23733 | neg find isPrimitive(element); | ||
23734 | } or | ||
23735 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
23736 | /** | ||
23737 | * An element must be an instance of type "Synchronization class". | ||
23738 | */ | ||
23739 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23740 | Type.name(type,"Synchronization class"); | ||
23741 | find directInstanceOf(problem,interpretation,element,type); | ||
23742 | } | ||
23743 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23744 | find interpretation(problem,interpretation); | ||
23745 | PartialInterpretation.scopes(interpretation,scope); | ||
23746 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23747 | Scope.maxNewElements(scope,0); | ||
23748 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23749 | Type.name(type,"Synchronization class"); | ||
23750 | } | ||
23751 | |||
23752 | /** | ||
23753 | * An element may be an instance of type "Synchronization class". | ||
23754 | */ | ||
23755 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23756 | { | ||
23757 | find interpretation(problem,interpretation); | ||
23758 | PartialInterpretation.newElements(interpretation,element); | ||
23759 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23760 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23761 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23762 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23763 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23764 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23765 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23766 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
23767 | neg find isPrimitive(element); | ||
23768 | } or { | ||
23769 | find interpretation(problem,interpretation); | ||
23770 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23771 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23772 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23773 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23774 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23775 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23776 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23777 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23778 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
23779 | neg find isPrimitive(element); | ||
23780 | } or | ||
23781 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
23782 | /** | ||
23783 | * An element must be an instance of type "State class". | ||
23784 | */ | ||
23785 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23786 | Type.name(type,"State class"); | ||
23787 | find directInstanceOf(problem,interpretation,element,type); | ||
23788 | } | ||
23789 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23790 | find interpretation(problem,interpretation); | ||
23791 | PartialInterpretation.scopes(interpretation,scope); | ||
23792 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23793 | Scope.maxNewElements(scope,0); | ||
23794 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23795 | Type.name(type,"State class"); | ||
23796 | } | ||
23797 | |||
23798 | /** | ||
23799 | * An element may be an instance of type "State class". | ||
23800 | */ | ||
23801 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23802 | { | ||
23803 | find interpretation(problem,interpretation); | ||
23804 | PartialInterpretation.newElements(interpretation,element); | ||
23805 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23806 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23807 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
23808 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
23809 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23810 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
23811 | neg find isPrimitive(element); | ||
23812 | } or { | ||
23813 | find interpretation(problem,interpretation); | ||
23814 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23815 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23816 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23817 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
23818 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
23819 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23820 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
23821 | neg find isPrimitive(element); | ||
23822 | } or | ||
23823 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
23824 | /** | ||
23825 | * An element must be an instance of type "RegularState class". | ||
23826 | */ | ||
23827 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23828 | Type.name(type,"RegularState class"); | ||
23829 | find directInstanceOf(problem,interpretation,element,type); | ||
23830 | } | ||
23831 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23832 | find interpretation(problem,interpretation); | ||
23833 | PartialInterpretation.scopes(interpretation,scope); | ||
23834 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23835 | Scope.maxNewElements(scope,0); | ||
23836 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23837 | Type.name(type,"RegularState class"); | ||
23838 | } | ||
23839 | |||
23840 | /** | ||
23841 | * An element may be an instance of type "RegularState class". | ||
23842 | */ | ||
23843 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23844 | { | ||
23845 | find interpretation(problem,interpretation); | ||
23846 | PartialInterpretation.newElements(interpretation,element); | ||
23847 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23848 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23849 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23850 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
23851 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23852 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
23853 | neg find isPrimitive(element); | ||
23854 | } or { | ||
23855 | find interpretation(problem,interpretation); | ||
23856 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23857 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
23858 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23859 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23860 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
23861 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23862 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
23863 | neg find isPrimitive(element); | ||
23864 | } or | ||
23865 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
23866 | /** | ||
23867 | * An element must be an instance of type "CompositeElement class". | ||
23868 | */ | ||
23869 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23870 | Type.name(type,"CompositeElement class"); | ||
23871 | find directInstanceOf(problem,interpretation,element,type); | ||
23872 | } | ||
23873 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23874 | find interpretation(problem,interpretation); | ||
23875 | PartialInterpretation.scopes(interpretation,scope); | ||
23876 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23877 | Scope.maxNewElements(scope,0); | ||
23878 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23879 | Type.name(type,"CompositeElement class"); | ||
23880 | } | ||
23881 | |||
23882 | /** | ||
23883 | * An element may be an instance of type "CompositeElement class". | ||
23884 | */ | ||
23885 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23886 | { | ||
23887 | find interpretation(problem,interpretation); | ||
23888 | PartialInterpretation.newElements(interpretation,element); | ||
23889 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
23890 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23891 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
23892 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23893 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23894 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
23895 | neg find isPrimitive(element); | ||
23896 | } or { | ||
23897 | find interpretation(problem,interpretation); | ||
23898 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23899 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
23900 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23901 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
23902 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
23903 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23904 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
23905 | neg find isPrimitive(element); | ||
23906 | } or | ||
23907 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
23908 | /** | ||
23909 | * An element must be an instance of type "Choice class". | ||
23910 | */ | ||
23911 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23912 | Type.name(type,"Choice class"); | ||
23913 | find directInstanceOf(problem,interpretation,element,type); | ||
23914 | } | ||
23915 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23916 | find interpretation(problem,interpretation); | ||
23917 | PartialInterpretation.scopes(interpretation,scope); | ||
23918 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23919 | Scope.maxNewElements(scope,0); | ||
23920 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23921 | Type.name(type,"Choice class"); | ||
23922 | } | ||
23923 | |||
23924 | /** | ||
23925 | * An element may be an instance of type "Choice class". | ||
23926 | */ | ||
23927 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23928 | { | ||
23929 | find interpretation(problem,interpretation); | ||
23930 | PartialInterpretation.newElements(interpretation,element); | ||
23931 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23932 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23933 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23934 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23935 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23936 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23937 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23938 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
23939 | neg find isPrimitive(element); | ||
23940 | } or { | ||
23941 | find interpretation(problem,interpretation); | ||
23942 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23943 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
23944 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23945 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23946 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23947 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23948 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23949 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23950 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
23951 | neg find isPrimitive(element); | ||
23952 | } or | ||
23953 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
23954 | /** | ||
23955 | * An element must be an instance of type "Exit class". | ||
23956 | */ | ||
23957 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23958 | Type.name(type,"Exit class"); | ||
23959 | find directInstanceOf(problem,interpretation,element,type); | ||
23960 | } | ||
23961 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23962 | find interpretation(problem,interpretation); | ||
23963 | PartialInterpretation.scopes(interpretation,scope); | ||
23964 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23965 | Scope.maxNewElements(scope,0); | ||
23966 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23967 | Type.name(type,"Exit class"); | ||
23968 | } | ||
23969 | |||
23970 | /** | ||
23971 | * An element may be an instance of type "Exit class". | ||
23972 | */ | ||
23973 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23974 | { | ||
23975 | find interpretation(problem,interpretation); | ||
23976 | PartialInterpretation.newElements(interpretation,element); | ||
23977 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23978 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23979 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23980 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23981 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23982 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23983 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23984 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
23985 | neg find isPrimitive(element); | ||
23986 | } or { | ||
23987 | find interpretation(problem,interpretation); | ||
23988 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23989 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
23990 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
23991 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
23992 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
23993 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
23994 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
23995 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
23996 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
23997 | neg find isPrimitive(element); | ||
23998 | } or | ||
23999 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
24000 | /** | ||
24001 | * An element must be an instance of type "FinalState class". | ||
24002 | */ | ||
24003 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24004 | Type.name(type,"FinalState class"); | ||
24005 | find directInstanceOf(problem,interpretation,element,type); | ||
24006 | } | ||
24007 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24008 | find interpretation(problem,interpretation); | ||
24009 | PartialInterpretation.scopes(interpretation,scope); | ||
24010 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24011 | Scope.maxNewElements(scope,0); | ||
24012 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24013 | Type.name(type,"FinalState class"); | ||
24014 | } | ||
24015 | |||
24016 | /** | ||
24017 | * An element may be an instance of type "FinalState class". | ||
24018 | */ | ||
24019 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24020 | { | ||
24021 | find interpretation(problem,interpretation); | ||
24022 | PartialInterpretation.newElements(interpretation,element); | ||
24023 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
24024 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
24025 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
24026 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
24027 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
24028 | neg find isPrimitive(element); | ||
24029 | } or { | ||
24030 | find interpretation(problem,interpretation); | ||
24031 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24032 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
24033 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
24034 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
24035 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
24036 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
24037 | neg find isPrimitive(element); | ||
24038 | } or | ||
24039 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
24040 | /** | ||
24041 | * An element must be an instance of type "Statechart class DefinedPart". | ||
24042 | */ | ||
24043 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24044 | Type.name(type,"Statechart class DefinedPart"); | ||
24045 | find directInstanceOf(problem,interpretation,element,type); | ||
24046 | } | ||
24047 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24048 | find interpretation(problem,interpretation); | ||
24049 | PartialInterpretation.scopes(interpretation,scope); | ||
24050 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24051 | Scope.maxNewElements(scope,0); | ||
24052 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24053 | Type.name(type,"Statechart class DefinedPart"); | ||
24054 | } | ||
24055 | |||
24056 | /** | ||
24057 | * An element may be an instance of type "Statechart class DefinedPart". | ||
24058 | */ | ||
24059 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24060 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
24061 | /** | ||
24062 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
24063 | */ | ||
24064 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24065 | Type.name(type,"Statechart class UndefinedPart"); | ||
24066 | find directInstanceOf(problem,interpretation,element,type); | ||
24067 | } | ||
24068 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24069 | find interpretation(problem,interpretation); | ||
24070 | PartialInterpretation.scopes(interpretation,scope); | ||
24071 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24072 | Scope.maxNewElements(scope,0); | ||
24073 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24074 | Type.name(type,"Statechart class UndefinedPart"); | ||
24075 | } | ||
24076 | |||
24077 | /** | ||
24078 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
24079 | */ | ||
24080 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24081 | { | ||
24082 | find interpretation(problem,interpretation); | ||
24083 | PartialInterpretation.newElements(interpretation,element); | ||
24084 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
24085 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
24086 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
24087 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
24088 | neg find isPrimitive(element); | ||
24089 | } or { | ||
24090 | find interpretation(problem,interpretation); | ||
24091 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24092 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
24093 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
24094 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
24095 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
24096 | neg find isPrimitive(element); | ||
24097 | } or | ||
24098 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
24099 | /** | ||
24100 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
24101 | */ | ||
24102 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24103 | Type.name(type,"CompositeElement class DefinedPart"); | ||
24104 | find directInstanceOf(problem,interpretation,element,type); | ||
24105 | } | ||
24106 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24107 | find interpretation(problem,interpretation); | ||
24108 | PartialInterpretation.scopes(interpretation,scope); | ||
24109 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24110 | Scope.maxNewElements(scope,0); | ||
24111 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24112 | Type.name(type,"CompositeElement class DefinedPart"); | ||
24113 | } | ||
24114 | |||
24115 | /** | ||
24116 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
24117 | */ | ||
24118 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24119 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
24120 | /** | ||
24121 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
24122 | */ | ||
24123 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24124 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
24125 | find directInstanceOf(problem,interpretation,element,type); | ||
24126 | } | ||
24127 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24128 | find interpretation(problem,interpretation); | ||
24129 | PartialInterpretation.scopes(interpretation,scope); | ||
24130 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24131 | Scope.maxNewElements(scope,0); | ||
24132 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24133 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
24134 | } | ||
24135 | |||
24136 | /** | ||
24137 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
24138 | */ | ||
24139 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24140 | { | ||
24141 | find interpretation(problem,interpretation); | ||
24142 | PartialInterpretation.newElements(interpretation,element); | ||
24143 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
24144 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
24145 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
24146 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
24147 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
24148 | neg find isPrimitive(element); | ||
24149 | } or { | ||
24150 | find interpretation(problem,interpretation); | ||
24151 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24152 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
24153 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
24154 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
24155 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
24156 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
24157 | neg find isPrimitive(element); | ||
24158 | } or | ||
24159 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
24160 | |||
24161 | ////////// | ||
24162 | // 1.2 Relation Declaration Indexers | ||
24163 | ////////// | ||
24164 | /** | ||
24165 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
24166 | */ | ||
24167 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
24168 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24169 | source: DefinedElement, target:DefinedElement) | ||
24170 | { | ||
24171 | find interpretation(problem,interpretation); | ||
24172 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24173 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
24174 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24175 | BinaryElementRelationLink.param1(link,source); | ||
24176 | BinaryElementRelationLink.param2(link,target); | ||
24177 | } | ||
24178 | /** | ||
24179 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
24180 | */ | ||
24181 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
24182 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24183 | source: DefinedElement, target:DefinedElement) | ||
24184 | { | ||
24185 | find interpretation(problem,interpretation); | ||
24186 | // The two endpoint of the link have to exist | ||
24187 | find mayExist(problem, interpretation, source); | ||
24188 | find mayExist(problem, interpretation, target); | ||
24189 | // Type consistency | ||
24190 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
24191 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
24192 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
24193 | // the upper bound of the opposite reference multiplicity should be considered. | ||
24194 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
24195 | check(numberOfExistingOppositeReferences < 1); | ||
24196 | } or { | ||
24197 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
24198 | } | ||
24199 | /** | ||
24200 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
24201 | */ | ||
24202 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
24203 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24204 | source: DefinedElement, target:DefinedElement) | ||
24205 | { | ||
24206 | find interpretation(problem,interpretation); | ||
24207 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24208 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
24209 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24210 | BinaryElementRelationLink.param1(link,source); | ||
24211 | BinaryElementRelationLink.param2(link,target); | ||
24212 | } | ||
24213 | /** | ||
24214 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
24215 | */ | ||
24216 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
24217 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24218 | source: DefinedElement, target:DefinedElement) | ||
24219 | { | ||
24220 | find interpretation(problem,interpretation); | ||
24221 | // The two endpoint of the link have to exist | ||
24222 | find mayExist(problem, interpretation, source); | ||
24223 | find mayExist(problem, interpretation, target); | ||
24224 | // Type consistency | ||
24225 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
24226 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
24227 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
24228 | // the upper bound of the opposite reference multiplicity should be considered. | ||
24229 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
24230 | check(numberOfExistingOppositeReferences < 1); | ||
24231 | // The reference is containment, then a new reference cannot be create if: | ||
24232 | // 1. Multiple parents | ||
24233 | neg find mustContains4(problem,interpretation,_,target); | ||
24234 | // 2. Circle in the containment hierarchy | ||
24235 | neg find mustTransitiveContains(source,target); | ||
24236 | } or { | ||
24237 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
24238 | } | ||
24239 | /** | ||
24240 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
24241 | */ | ||
24242 | private pattern mustInRelationvertices_reference_Region( | ||
24243 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24244 | source: DefinedElement, target:DefinedElement) | ||
24245 | { | ||
24246 | find interpretation(problem,interpretation); | ||
24247 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24248 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
24249 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24250 | BinaryElementRelationLink.param1(link,source); | ||
24251 | BinaryElementRelationLink.param2(link,target); | ||
24252 | } | ||
24253 | /** | ||
24254 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
24255 | */ | ||
24256 | private pattern mayInRelationvertices_reference_Region( | ||
24257 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24258 | source: DefinedElement, target:DefinedElement) | ||
24259 | { | ||
24260 | find interpretation(problem,interpretation); | ||
24261 | // The two endpoint of the link have to exist | ||
24262 | find mayExist(problem, interpretation, source); | ||
24263 | find mayExist(problem, interpretation, target); | ||
24264 | // Type consistency | ||
24265 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
24266 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
24267 | // The reference is containment, then a new reference cannot be create if: | ||
24268 | // 1. Multiple parents | ||
24269 | neg find mustContains4(problem,interpretation,_,target); | ||
24270 | // 2. Circle in the containment hierarchy | ||
24271 | neg find mustTransitiveContains(source,target); | ||
24272 | } or { | ||
24273 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
24274 | } | ||
24275 | /** | ||
24276 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
24277 | */ | ||
24278 | private pattern mustInRelationtarget_reference_Transition( | ||
24279 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24280 | source: DefinedElement, target:DefinedElement) | ||
24281 | { | ||
24282 | find interpretation(problem,interpretation); | ||
24283 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24284 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
24285 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24286 | BinaryElementRelationLink.param1(link,source); | ||
24287 | BinaryElementRelationLink.param2(link,target); | ||
24288 | } | ||
24289 | /** | ||
24290 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
24291 | */ | ||
24292 | private pattern mayInRelationtarget_reference_Transition( | ||
24293 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24294 | source: DefinedElement, target:DefinedElement) | ||
24295 | { | ||
24296 | find interpretation(problem,interpretation); | ||
24297 | // The two endpoint of the link have to exist | ||
24298 | find mayExist(problem, interpretation, source); | ||
24299 | find mayExist(problem, interpretation, target); | ||
24300 | // Type consistency | ||
24301 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
24302 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
24303 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
24304 | // the upper bound of the multiplicity should be considered. | ||
24305 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
24306 | check(numberOfExistingReferences < 1); | ||
24307 | } or { | ||
24308 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
24309 | } | ||
24310 | /** | ||
24311 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
24312 | */ | ||
24313 | private pattern mustInRelationsource_reference_Transition( | ||
24314 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24315 | source: DefinedElement, target:DefinedElement) | ||
24316 | { | ||
24317 | find interpretation(problem,interpretation); | ||
24318 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24319 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
24320 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24321 | BinaryElementRelationLink.param1(link,source); | ||
24322 | BinaryElementRelationLink.param2(link,target); | ||
24323 | } | ||
24324 | /** | ||
24325 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
24326 | */ | ||
24327 | private pattern mayInRelationsource_reference_Transition( | ||
24328 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24329 | source: DefinedElement, target:DefinedElement) | ||
24330 | { | ||
24331 | find interpretation(problem,interpretation); | ||
24332 | // The two endpoint of the link have to exist | ||
24333 | find mayExist(problem, interpretation, source); | ||
24334 | find mayExist(problem, interpretation, target); | ||
24335 | // Type consistency | ||
24336 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
24337 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
24338 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
24339 | // the upper bound of the multiplicity should be considered. | ||
24340 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
24341 | check(numberOfExistingReferences < 1); | ||
24342 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
24343 | // 1. Multiple parents | ||
24344 | neg find mustContains4(problem,interpretation,source,_); | ||
24345 | // 2. Circle in the containment hierarchy | ||
24346 | neg find mustTransitiveContains(source,target); | ||
24347 | } or { | ||
24348 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
24349 | } | ||
24350 | /** | ||
24351 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
24352 | */ | ||
24353 | private pattern mustInRelationregions_reference_CompositeElement( | ||
24354 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24355 | source: DefinedElement, target:DefinedElement) | ||
24356 | { | ||
24357 | find interpretation(problem,interpretation); | ||
24358 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24359 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
24360 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24361 | BinaryElementRelationLink.param1(link,source); | ||
24362 | BinaryElementRelationLink.param2(link,target); | ||
24363 | } | ||
24364 | /** | ||
24365 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
24366 | */ | ||
24367 | private pattern mayInRelationregions_reference_CompositeElement( | ||
24368 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24369 | source: DefinedElement, target:DefinedElement) | ||
24370 | { | ||
24371 | find interpretation(problem,interpretation); | ||
24372 | // The two endpoint of the link have to exist | ||
24373 | find mayExist(problem, interpretation, source); | ||
24374 | find mayExist(problem, interpretation, target); | ||
24375 | // Type consistency | ||
24376 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
24377 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
24378 | // The reference is containment, then a new reference cannot be create if: | ||
24379 | // 1. Multiple parents | ||
24380 | neg find mustContains4(problem,interpretation,_,target); | ||
24381 | // 2. Circle in the containment hierarchy | ||
24382 | neg find mustTransitiveContains(source,target); | ||
24383 | } or { | ||
24384 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
24385 | } | ||
24386 | |||
24387 | ////////// | ||
24388 | // 1.3 Relation Definition Indexers | ||
24389 | ////////// | ||
24390 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
24391 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
24392 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24393 | var_r1, var_e1) | ||
24394 | { | ||
24395 | find interpretation(problem,interpretation); | ||
24396 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24397 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
24398 | // r1 is exported | ||
24399 | // e1 is exported | ||
24400 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24401 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
24402 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24403 | var_virtual0 == var_e1; | ||
24404 | } | ||
24405 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
24406 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24407 | var_r1, var_e1) | ||
24408 | { | ||
24409 | find interpretation(problem,interpretation); | ||
24410 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24411 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
24412 | // r1 is exported | ||
24413 | // e1 is exported | ||
24414 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24415 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
24416 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24417 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
24418 | } | ||
24419 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
24420 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24421 | var_r1, var_e1) | ||
24422 | { | ||
24423 | find interpretation(problem,interpretation); | ||
24424 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24425 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
24426 | // r1 is exported | ||
24427 | // e1 is exported | ||
24428 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24429 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
24430 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24431 | var_virtual0 == var_e1; | ||
24432 | } | ||
24433 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
24434 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
24435 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24436 | var_r1) | ||
24437 | { | ||
24438 | find interpretation(problem,interpretation); | ||
24439 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24440 | // r1 is exported | ||
24441 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
24442 | } | ||
24443 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
24444 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24445 | var_r1) | ||
24446 | { | ||
24447 | find interpretation(problem,interpretation); | ||
24448 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24449 | // r1 is exported | ||
24450 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
24451 | } | ||
24452 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
24453 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24454 | var_r1) | ||
24455 | { | ||
24456 | find interpretation(problem,interpretation); | ||
24457 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
24458 | // r1 is exported | ||
24459 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
24460 | } | ||
24461 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
24462 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
24463 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24464 | var_r) | ||
24465 | { | ||
24466 | find interpretation(problem,interpretation); | ||
24467 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
24468 | // r is exported | ||
24469 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
24470 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
24471 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
24472 | } | ||
24473 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
24474 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24475 | var_r) | ||
24476 | { | ||
24477 | find interpretation(problem,interpretation); | ||
24478 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
24479 | // r is exported | ||
24480 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
24481 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
24482 | var_e1 != var_e2; | ||
24483 | } | ||
24484 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
24485 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24486 | var_r) | ||
24487 | { | ||
24488 | find interpretation(problem,interpretation); | ||
24489 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
24490 | // r is exported | ||
24491 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
24492 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
24493 | var_e1 != var_e2; | ||
24494 | } | ||
24495 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
24496 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
24497 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24498 | var_t, var_src, var_trg) | ||
24499 | { | ||
24500 | find interpretation(problem,interpretation); | ||
24501 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24502 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
24503 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
24504 | // t is exported | ||
24505 | // src is exported | ||
24506 | // trg is exported | ||
24507 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24508 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
24509 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24510 | var_virtual0 == var_src; | ||
24511 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24512 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
24513 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
24514 | var_virtual1 == var_trg; | ||
24515 | } | ||
24516 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
24517 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24518 | var_t, var_src, var_trg) | ||
24519 | { | ||
24520 | find interpretation(problem,interpretation); | ||
24521 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
24522 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
24523 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
24524 | // t is exported | ||
24525 | // src is exported | ||
24526 | // trg is exported | ||
24527 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
24528 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
24529 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24530 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
24531 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
24532 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
24533 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
24534 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
24535 | } | ||
24536 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
24537 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24538 | var_t, var_src, var_trg) | ||
24539 | { | ||
24540 | find interpretation(problem,interpretation); | ||
24541 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24542 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
24543 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
24544 | // t is exported | ||
24545 | // src is exported | ||
24546 | // trg is exported | ||
24547 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24548 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
24549 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24550 | var_virtual0 == var_src; | ||
24551 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24552 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
24553 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
24554 | var_virtual1 == var_trg; | ||
24555 | } | ||
24556 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
24557 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
24558 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24559 | var_t, var_e) | ||
24560 | { | ||
24561 | find interpretation(problem,interpretation); | ||
24562 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24563 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24564 | // t is exported | ||
24565 | // e is exported | ||
24566 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
24567 | } | ||
24568 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
24569 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24570 | var_t, var_e) | ||
24571 | { | ||
24572 | find interpretation(problem,interpretation); | ||
24573 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
24574 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
24575 | // t is exported | ||
24576 | // e is exported | ||
24577 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
24578 | } | ||
24579 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
24580 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24581 | var_t, var_e) | ||
24582 | { | ||
24583 | find interpretation(problem,interpretation); | ||
24584 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24585 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24586 | // t is exported | ||
24587 | // e is exported | ||
24588 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
24589 | } | ||
24590 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
24591 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
24592 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24593 | var_e) | ||
24594 | { | ||
24595 | find interpretation(problem,interpretation); | ||
24596 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24597 | // e is exported | ||
24598 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
24599 | } | ||
24600 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
24601 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24602 | var_e) | ||
24603 | { | ||
24604 | find interpretation(problem,interpretation); | ||
24605 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
24606 | // e is exported | ||
24607 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
24608 | } | ||
24609 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
24610 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24611 | var_e) | ||
24612 | { | ||
24613 | find interpretation(problem,interpretation); | ||
24614 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24615 | // e is exported | ||
24616 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
24617 | } | ||
24618 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
24619 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
24620 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24621 | var_e, var_t1, var_t2) | ||
24622 | { | ||
24623 | find interpretation(problem,interpretation); | ||
24624 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24625 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
24626 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
24627 | // e is exported | ||
24628 | // t1 is exported | ||
24629 | // t2 is exported | ||
24630 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24631 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
24632 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24633 | var_virtual0 == var_t1; | ||
24634 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24635 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
24636 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
24637 | var_virtual1 == var_t2; | ||
24638 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
24639 | } | ||
24640 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
24641 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24642 | var_e, var_t1, var_t2) | ||
24643 | { | ||
24644 | find interpretation(problem,interpretation); | ||
24645 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
24646 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
24647 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
24648 | // e is exported | ||
24649 | // t1 is exported | ||
24650 | // t2 is exported | ||
24651 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
24652 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
24653 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24654 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
24655 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
24656 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
24657 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
24658 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
24659 | var_t1 != var_t2; | ||
24660 | } | ||
24661 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
24662 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24663 | var_e, var_t1, var_t2) | ||
24664 | { | ||
24665 | find interpretation(problem,interpretation); | ||
24666 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24667 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
24668 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
24669 | // e is exported | ||
24670 | // t1 is exported | ||
24671 | // t2 is exported | ||
24672 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24673 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
24674 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24675 | var_virtual0 == var_t1; | ||
24676 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
24677 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
24678 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
24679 | var_virtual1 == var_t2; | ||
24680 | var_t1 != var_t2; | ||
24681 | } | ||
24682 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
24683 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
24684 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24685 | var_t, var_e) | ||
24686 | { | ||
24687 | find interpretation(problem,interpretation); | ||
24688 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24689 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
24690 | // t is exported | ||
24691 | // e is exported | ||
24692 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
24693 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
24694 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24695 | var_virtual0 == var_t; | ||
24696 | } | ||
24697 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
24698 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24699 | var_t, var_e) | ||
24700 | { | ||
24701 | find interpretation(problem,interpretation); | ||
24702 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
24703 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
24704 | // t is exported | ||
24705 | // e is exported | ||
24706 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
24707 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
24708 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24709 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
24710 | } | ||
24711 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
24712 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24713 | var_t, var_e) | ||
24714 | { | ||
24715 | find interpretation(problem,interpretation); | ||
24716 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24717 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
24718 | // t is exported | ||
24719 | // e is exported | ||
24720 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
24721 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
24722 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24723 | var_virtual0 == var_t; | ||
24724 | } | ||
24725 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
24726 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
24727 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24728 | var_t, var_f) | ||
24729 | { | ||
24730 | find interpretation(problem,interpretation); | ||
24731 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24732 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
24733 | // t is exported | ||
24734 | // f is exported | ||
24735 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
24736 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
24737 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24738 | var_virtual0 == var_t; | ||
24739 | } | ||
24740 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
24741 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24742 | var_t, var_f) | ||
24743 | { | ||
24744 | find interpretation(problem,interpretation); | ||
24745 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
24746 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
24747 | // t is exported | ||
24748 | // f is exported | ||
24749 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
24750 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
24751 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24752 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
24753 | } | ||
24754 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
24755 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24756 | var_t, var_f) | ||
24757 | { | ||
24758 | find interpretation(problem,interpretation); | ||
24759 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
24760 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
24761 | // t is exported | ||
24762 | // f is exported | ||
24763 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
24764 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
24765 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
24766 | var_virtual0 == var_t; | ||
24767 | } | ||
24768 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
24769 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
24770 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24771 | var_region) | ||
24772 | { | ||
24773 | find interpretation(problem,interpretation); | ||
24774 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
24775 | // region is exported | ||
24776 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
24777 | } | ||
24778 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
24779 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24780 | var_region) | ||
24781 | { | ||
24782 | find interpretation(problem,interpretation); | ||
24783 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
24784 | // region is exported | ||
24785 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
24786 | } | ||
24787 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
24788 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24789 | var_region) | ||
24790 | { | ||
24791 | find interpretation(problem,interpretation); | ||
24792 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
24793 | // region is exported | ||
24794 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
24795 | } | ||
24796 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
24797 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
24798 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24799 | var_region, var_state) | ||
24800 | { | ||
24801 | find interpretation(problem,interpretation); | ||
24802 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
24803 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
24804 | // region is exported | ||
24805 | // state is exported | ||
24806 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
24807 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
24808 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24809 | var_virtual0 == var_state; | ||
24810 | } | ||
24811 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
24812 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24813 | var_region, var_state) | ||
24814 | { | ||
24815 | find interpretation(problem,interpretation); | ||
24816 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
24817 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
24818 | // region is exported | ||
24819 | // state is exported | ||
24820 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
24821 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
24822 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24823 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
24824 | } | ||
24825 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
24826 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24827 | var_region, var_state) | ||
24828 | { | ||
24829 | find interpretation(problem,interpretation); | ||
24830 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
24831 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
24832 | // region is exported | ||
24833 | // state is exported | ||
24834 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
24835 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
24836 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24837 | var_virtual0 == var_state; | ||
24838 | } | ||
24839 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
24840 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
24841 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24842 | var_c) | ||
24843 | { | ||
24844 | find interpretation(problem,interpretation); | ||
24845 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
24846 | // c is exported | ||
24847 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
24848 | } | ||
24849 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
24850 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24851 | var_c) | ||
24852 | { | ||
24853 | find interpretation(problem,interpretation); | ||
24854 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
24855 | // c is exported | ||
24856 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
24857 | } | ||
24858 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
24859 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24860 | var_c) | ||
24861 | { | ||
24862 | find interpretation(problem,interpretation); | ||
24863 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
24864 | // c is exported | ||
24865 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
24866 | } | ||
24867 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
24868 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
24869 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24870 | var_c) | ||
24871 | { | ||
24872 | find interpretation(problem,interpretation); | ||
24873 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
24874 | // c is exported | ||
24875 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
24876 | } | ||
24877 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
24878 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24879 | var_c) | ||
24880 | { | ||
24881 | find interpretation(problem,interpretation); | ||
24882 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
24883 | // c is exported | ||
24884 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
24885 | } | ||
24886 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
24887 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24888 | var_c) | ||
24889 | { | ||
24890 | find interpretation(problem,interpretation); | ||
24891 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
24892 | // c is exported | ||
24893 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
24894 | } | ||
24895 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
24896 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
24897 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24898 | var_s) | ||
24899 | { | ||
24900 | find interpretation(problem,interpretation); | ||
24901 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24902 | // s is exported | ||
24903 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
24904 | } | ||
24905 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
24906 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24907 | var_s) | ||
24908 | { | ||
24909 | find interpretation(problem,interpretation); | ||
24910 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24911 | // s is exported | ||
24912 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
24913 | } | ||
24914 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
24915 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24916 | var_s) | ||
24917 | { | ||
24918 | find interpretation(problem,interpretation); | ||
24919 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24920 | // s is exported | ||
24921 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
24922 | } | ||
24923 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
24924 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
24925 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24926 | var_s) | ||
24927 | { | ||
24928 | find interpretation(problem,interpretation); | ||
24929 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24930 | // s is exported | ||
24931 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
24932 | } | ||
24933 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
24934 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24935 | var_s) | ||
24936 | { | ||
24937 | find interpretation(problem,interpretation); | ||
24938 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24939 | // s is exported | ||
24940 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
24941 | } | ||
24942 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
24943 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24944 | var_s) | ||
24945 | { | ||
24946 | find interpretation(problem,interpretation); | ||
24947 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24948 | // s is exported | ||
24949 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
24950 | } | ||
24951 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
24952 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
24953 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24954 | var_s, var_v1, var_v2) | ||
24955 | { | ||
24956 | find interpretation(problem,interpretation); | ||
24957 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24958 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
24959 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
24960 | // s is exported | ||
24961 | // v1 is exported | ||
24962 | // v2 is exported | ||
24963 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
24964 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
24965 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
24966 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
24967 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
24968 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24969 | var_virtual0 == var_v1; | ||
24970 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
24971 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
24972 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
24973 | var_virtual1 == var_v2; | ||
24974 | }or{ | ||
24975 | find interpretation(problem,interpretation); | ||
24976 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
24977 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
24978 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
24979 | // s is exported | ||
24980 | // v1 is exported | ||
24981 | // v2 is exported | ||
24982 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
24983 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
24984 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
24985 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
24986 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
24987 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
24988 | var_virtual0 == var_v1; | ||
24989 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
24990 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
24991 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
24992 | var_virtual1 == var_v2; | ||
24993 | } | ||
24994 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
24995 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24996 | var_s, var_v1, var_v2) | ||
24997 | { | ||
24998 | find interpretation(problem,interpretation); | ||
24999 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25000 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25001 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25002 | // s is exported | ||
25003 | // v1 is exported | ||
25004 | // v2 is exported | ||
25005 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
25006 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
25007 | var_t1 != var_t2; | ||
25008 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
25009 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
25010 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25011 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
25012 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
25013 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
25014 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25015 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
25016 | }or{ | ||
25017 | find interpretation(problem,interpretation); | ||
25018 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25019 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25020 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25021 | // s is exported | ||
25022 | // v1 is exported | ||
25023 | // v2 is exported | ||
25024 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
25025 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
25026 | var_t1 != var_t2; | ||
25027 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
25028 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
25029 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25030 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
25031 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
25032 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
25033 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25034 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
25035 | } | ||
25036 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
25037 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25038 | var_s, var_v1, var_v2) | ||
25039 | { | ||
25040 | find interpretation(problem,interpretation); | ||
25041 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25042 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25043 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25044 | // s is exported | ||
25045 | // v1 is exported | ||
25046 | // v2 is exported | ||
25047 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
25048 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
25049 | var_t1 != var_t2; | ||
25050 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
25051 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
25052 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25053 | var_virtual0 == var_v1; | ||
25054 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
25055 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
25056 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25057 | var_virtual1 == var_v2; | ||
25058 | }or{ | ||
25059 | find interpretation(problem,interpretation); | ||
25060 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25061 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25062 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25063 | // s is exported | ||
25064 | // v1 is exported | ||
25065 | // v2 is exported | ||
25066 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
25067 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
25068 | var_t1 != var_t2; | ||
25069 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
25070 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
25071 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25072 | var_virtual0 == var_v1; | ||
25073 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
25074 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
25075 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25076 | var_virtual1 == var_v2; | ||
25077 | } | ||
25078 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
25079 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
25080 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25081 | var_s) | ||
25082 | { | ||
25083 | find interpretation(problem,interpretation); | ||
25084 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25085 | // s is exported | ||
25086 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
25087 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
25088 | } | ||
25089 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
25090 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25091 | var_s) | ||
25092 | { | ||
25093 | find interpretation(problem,interpretation); | ||
25094 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25095 | // s is exported | ||
25096 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
25097 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
25098 | } | ||
25099 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
25100 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25101 | var_s) | ||
25102 | { | ||
25103 | find interpretation(problem,interpretation); | ||
25104 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25105 | // s is exported | ||
25106 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
25107 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
25108 | } | ||
25109 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
25110 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
25111 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25112 | var_v) | ||
25113 | { | ||
25114 | find interpretation(problem,interpretation); | ||
25115 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
25116 | // v is exported | ||
25117 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
25118 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
25119 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
25120 | } | ||
25121 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
25122 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25123 | var_v) | ||
25124 | { | ||
25125 | find interpretation(problem,interpretation); | ||
25126 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
25127 | // v is exported | ||
25128 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
25129 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
25130 | var_trg1 != var_trg2; | ||
25131 | } | ||
25132 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
25133 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25134 | var_v) | ||
25135 | { | ||
25136 | find interpretation(problem,interpretation); | ||
25137 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
25138 | // v is exported | ||
25139 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
25140 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
25141 | var_trg1 != var_trg2; | ||
25142 | } | ||
25143 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
25144 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
25145 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25146 | var_v) | ||
25147 | { | ||
25148 | find interpretation(problem,interpretation); | ||
25149 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
25150 | // v is exported | ||
25151 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
25152 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
25153 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
25154 | } | ||
25155 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
25156 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25157 | var_v) | ||
25158 | { | ||
25159 | find interpretation(problem,interpretation); | ||
25160 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
25161 | // v is exported | ||
25162 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
25163 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
25164 | var_src1 != var_src2; | ||
25165 | } | ||
25166 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
25167 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25168 | var_v) | ||
25169 | { | ||
25170 | find interpretation(problem,interpretation); | ||
25171 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
25172 | // v is exported | ||
25173 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
25174 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
25175 | var_src1 != var_src2; | ||
25176 | } | ||
25177 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
25178 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
25179 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25180 | var_s, var_v1, var_v2) | ||
25181 | { | ||
25182 | find interpretation(problem,interpretation); | ||
25183 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25184 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25185 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25186 | // s is exported | ||
25187 | // v1 is exported | ||
25188 | // v2 is exported | ||
25189 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
25190 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
25191 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
25192 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
25193 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25194 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25195 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25196 | var_virtual1 == var_v1; | ||
25197 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
25198 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
25199 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
25200 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
25201 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
25202 | var_virtual3 == var_v2; | ||
25203 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
25204 | }or{ | ||
25205 | find interpretation(problem,interpretation); | ||
25206 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25207 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25208 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25209 | // s is exported | ||
25210 | // v1 is exported | ||
25211 | // v2 is exported | ||
25212 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
25213 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
25214 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
25215 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
25216 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25217 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25218 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25219 | var_virtual1 == var_v1; | ||
25220 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
25221 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
25222 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
25223 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
25224 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
25225 | var_virtual3 == var_v2; | ||
25226 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
25227 | } | ||
25228 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
25229 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25230 | var_s, var_v1, var_v2) | ||
25231 | { | ||
25232 | find interpretation(problem,interpretation); | ||
25233 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25234 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25235 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25236 | // s is exported | ||
25237 | // v1 is exported | ||
25238 | // v2 is exported | ||
25239 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
25240 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
25241 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
25242 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
25243 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25244 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25245 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25246 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
25247 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
25248 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
25249 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
25250 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
25251 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
25252 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
25253 | var_r1 != var_r2; | ||
25254 | }or{ | ||
25255 | find interpretation(problem,interpretation); | ||
25256 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25257 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25258 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25259 | // s is exported | ||
25260 | // v1 is exported | ||
25261 | // v2 is exported | ||
25262 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
25263 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
25264 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
25265 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
25266 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25267 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25268 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25269 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
25270 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
25271 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
25272 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
25273 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
25274 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
25275 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
25276 | var_r1 != var_r2; | ||
25277 | } | ||
25278 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
25279 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25280 | var_s, var_v1, var_v2) | ||
25281 | { | ||
25282 | find interpretation(problem,interpretation); | ||
25283 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25284 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25285 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25286 | // s is exported | ||
25287 | // v1 is exported | ||
25288 | // v2 is exported | ||
25289 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
25290 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
25291 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
25292 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
25293 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25294 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25295 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25296 | var_virtual1 == var_v1; | ||
25297 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
25298 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
25299 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
25300 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
25301 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
25302 | var_virtual3 == var_v2; | ||
25303 | var_r1 != var_r2; | ||
25304 | }or{ | ||
25305 | find interpretation(problem,interpretation); | ||
25306 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25307 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
25308 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
25309 | // s is exported | ||
25310 | // v1 is exported | ||
25311 | // v2 is exported | ||
25312 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
25313 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
25314 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
25315 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
25316 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25317 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25318 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25319 | var_virtual1 == var_v1; | ||
25320 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
25321 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
25322 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
25323 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
25324 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
25325 | var_virtual3 == var_v2; | ||
25326 | var_r1 != var_r2; | ||
25327 | } | ||
25328 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
25329 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
25330 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25331 | var_parent, var_child) | ||
25332 | { | ||
25333 | find interpretation(problem,interpretation); | ||
25334 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
25335 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
25336 | // parent is exported | ||
25337 | // child is exported | ||
25338 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
25339 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
25340 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25341 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25342 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25343 | var_virtual1 == var_child; | ||
25344 | } | ||
25345 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
25346 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25347 | var_parent, var_child) | ||
25348 | { | ||
25349 | find interpretation(problem,interpretation); | ||
25350 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
25351 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
25352 | // parent is exported | ||
25353 | // child is exported | ||
25354 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
25355 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
25356 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25357 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25358 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25359 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
25360 | } | ||
25361 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
25362 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25363 | var_parent, var_child) | ||
25364 | { | ||
25365 | find interpretation(problem,interpretation); | ||
25366 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
25367 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
25368 | // parent is exported | ||
25369 | // child is exported | ||
25370 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
25371 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
25372 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25373 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
25374 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25375 | var_virtual1 == var_child; | ||
25376 | } | ||
25377 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
25378 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
25379 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25380 | var_s, var_v) | ||
25381 | { | ||
25382 | find interpretation(problem,interpretation); | ||
25383 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25384 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
25385 | // s is exported | ||
25386 | // v is exported | ||
25387 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
25388 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
25389 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
25390 | }or{ | ||
25391 | find interpretation(problem,interpretation); | ||
25392 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25393 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
25394 | // s is exported | ||
25395 | // v is exported | ||
25396 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
25397 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
25398 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
25399 | } | ||
25400 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
25401 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25402 | var_s, var_v) | ||
25403 | { | ||
25404 | find interpretation(problem,interpretation); | ||
25405 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25406 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
25407 | // s is exported | ||
25408 | // v is exported | ||
25409 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
25410 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
25411 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
25412 | }or{ | ||
25413 | find interpretation(problem,interpretation); | ||
25414 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25415 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
25416 | // s is exported | ||
25417 | // v is exported | ||
25418 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
25419 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
25420 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
25421 | } | ||
25422 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
25423 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25424 | var_s, var_v) | ||
25425 | { | ||
25426 | find interpretation(problem,interpretation); | ||
25427 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25428 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
25429 | // s is exported | ||
25430 | // v is exported | ||
25431 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
25432 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
25433 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
25434 | }or{ | ||
25435 | find interpretation(problem,interpretation); | ||
25436 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25437 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
25438 | // s is exported | ||
25439 | // v is exported | ||
25440 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
25441 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
25442 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
25443 | } | ||
25444 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
25445 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
25446 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25447 | var_composite) | ||
25448 | { | ||
25449 | find interpretation(problem,interpretation); | ||
25450 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25451 | // composite is exported | ||
25452 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25453 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
25454 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25455 | var_virtual0 == var_region1; | ||
25456 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25457 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
25458 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
25459 | var_virtual1 == var_region2; | ||
25460 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
25461 | } | ||
25462 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
25463 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25464 | var_composite) | ||
25465 | { | ||
25466 | find interpretation(problem,interpretation); | ||
25467 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25468 | // composite is exported | ||
25469 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25470 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
25471 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25472 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
25473 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25474 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
25475 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
25476 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
25477 | var_region1 != var_region2; | ||
25478 | } | ||
25479 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
25480 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25481 | var_composite) | ||
25482 | { | ||
25483 | find interpretation(problem,interpretation); | ||
25484 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25485 | // composite is exported | ||
25486 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25487 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
25488 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
25489 | var_virtual0 == var_region1; | ||
25490 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
25491 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
25492 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
25493 | var_virtual1 == var_region2; | ||
25494 | var_region1 != var_region2; | ||
25495 | } | ||
25496 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
25497 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
25498 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25499 | var_s) | ||
25500 | { | ||
25501 | find interpretation(problem,interpretation); | ||
25502 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25503 | // s is exported | ||
25504 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
25505 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
25506 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25507 | var_virtual0 == var_s; | ||
25508 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
25509 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
25510 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25511 | var_virtual1 == var_s; | ||
25512 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
25513 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
25514 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
25515 | var_virtual2 == var_s; | ||
25516 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
25517 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
25518 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
25519 | }or{ | ||
25520 | find interpretation(problem,interpretation); | ||
25521 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25522 | // s is exported | ||
25523 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
25524 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
25525 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25526 | var_virtual0 == var_s; | ||
25527 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
25528 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
25529 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25530 | var_virtual1 == var_s; | ||
25531 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
25532 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
25533 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
25534 | var_virtual2 == var_s; | ||
25535 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
25536 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
25537 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
25538 | } | ||
25539 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
25540 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25541 | var_s) | ||
25542 | { | ||
25543 | find interpretation(problem,interpretation); | ||
25544 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25545 | // s is exported | ||
25546 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
25547 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
25548 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25549 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
25550 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
25551 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
25552 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25553 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
25554 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
25555 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
25556 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
25557 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
25558 | var_t1 != var_t2; | ||
25559 | var_t2 != var_t3; | ||
25560 | var_t1 != var_t3; | ||
25561 | }or{ | ||
25562 | find interpretation(problem,interpretation); | ||
25563 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25564 | // s is exported | ||
25565 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
25566 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
25567 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25568 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
25569 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
25570 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
25571 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25572 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
25573 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
25574 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
25575 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
25576 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
25577 | var_t1 != var_t2; | ||
25578 | var_t2 != var_t3; | ||
25579 | var_t1 != var_t3; | ||
25580 | } | ||
25581 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
25582 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25583 | var_s) | ||
25584 | { | ||
25585 | find interpretation(problem,interpretation); | ||
25586 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25587 | // s is exported | ||
25588 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
25589 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
25590 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25591 | var_virtual0 == var_s; | ||
25592 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
25593 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
25594 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25595 | var_virtual1 == var_s; | ||
25596 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
25597 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
25598 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
25599 | var_virtual2 == var_s; | ||
25600 | var_t1 != var_t2; | ||
25601 | var_t2 != var_t3; | ||
25602 | var_t1 != var_t3; | ||
25603 | }or{ | ||
25604 | find interpretation(problem,interpretation); | ||
25605 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
25606 | // s is exported | ||
25607 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
25608 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
25609 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
25610 | var_virtual0 == var_s; | ||
25611 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
25612 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
25613 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
25614 | var_virtual1 == var_s; | ||
25615 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
25616 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
25617 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
25618 | var_virtual2 == var_s; | ||
25619 | var_t1 != var_t2; | ||
25620 | var_t2 != var_t3; | ||
25621 | var_t1 != var_t3; | ||
25622 | } | ||
25623 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
25624 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
25625 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25626 | var_s1, var_s2) | ||
25627 | { | ||
25628 | find interpretation(problem,interpretation); | ||
25629 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
25630 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
25631 | // s1 is exported | ||
25632 | // s2 is exported | ||
25633 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
25634 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
25635 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
25636 | } | ||
25637 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
25638 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25639 | var_s1, var_s2) | ||
25640 | { | ||
25641 | find interpretation(problem,interpretation); | ||
25642 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
25643 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
25644 | // s1 is exported | ||
25645 | // s2 is exported | ||
25646 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
25647 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
25648 | var_s1 != var_s2; | ||
25649 | } | ||
25650 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
25651 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25652 | var_s1, var_s2) | ||
25653 | { | ||
25654 | find interpretation(problem,interpretation); | ||
25655 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
25656 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
25657 | // s1 is exported | ||
25658 | // s2 is exported | ||
25659 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
25660 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
25661 | var_s1 != var_s2; | ||
25662 | } | ||
25663 | |||
25664 | ////////// | ||
25665 | // 1.4 Containment Indexer | ||
25666 | ////////// | ||
25667 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
25668 | find mustContains4(_,_,source,target); | ||
25669 | } | ||
25670 | |||
25671 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25672 | source: DefinedElement, target: DefinedElement) | ||
25673 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
25674 | |||
25675 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
25676 | |||
25677 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
25678 | |||
25679 | private pattern mustTransitiveContains(source,target) { | ||
25680 | find mustContains2+(source,target); | ||
25681 | } | ||
25682 | |||
25683 | ////////// | ||
25684 | // 2. Invalidation Indexers | ||
25685 | ////////// | ||
25686 | // 2.1 Invalidated by WF Queries | ||
25687 | ////////// | ||
25688 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25689 | var_r1) | ||
25690 | { | ||
25691 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
25692 | } | ||
25693 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25694 | var_r) | ||
25695 | { | ||
25696 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
25697 | } | ||
25698 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25699 | var_t, var_e) | ||
25700 | { | ||
25701 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
25702 | } | ||
25703 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25704 | var_e) | ||
25705 | { | ||
25706 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
25707 | } | ||
25708 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25709 | var_e, var_t1, var_t2) | ||
25710 | { | ||
25711 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
25712 | } | ||
25713 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25714 | var_t, var_e) | ||
25715 | { | ||
25716 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
25717 | } | ||
25718 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25719 | var_t, var_f) | ||
25720 | { | ||
25721 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
25722 | } | ||
25723 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25724 | var_region) | ||
25725 | { | ||
25726 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
25727 | } | ||
25728 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25729 | var_c) | ||
25730 | { | ||
25731 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
25732 | } | ||
25733 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25734 | var_c) | ||
25735 | { | ||
25736 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
25737 | } | ||
25738 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25739 | var_s) | ||
25740 | { | ||
25741 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
25742 | } | ||
25743 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25744 | var_s) | ||
25745 | { | ||
25746 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
25747 | } | ||
25748 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25749 | var_s, var_v1, var_v2) | ||
25750 | { | ||
25751 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
25752 | } | ||
25753 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25754 | var_s) | ||
25755 | { | ||
25756 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
25757 | } | ||
25758 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25759 | var_s, var_v1, var_v2) | ||
25760 | { | ||
25761 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
25762 | } | ||
25763 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25764 | var_s, var_v) | ||
25765 | { | ||
25766 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
25767 | } | ||
25768 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25769 | var_s) | ||
25770 | { | ||
25771 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
25772 | } | ||
25773 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25774 | var_s1, var_s2) | ||
25775 | { | ||
25776 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
25777 | } | ||
25778 | |||
25779 | ////////// | ||
25780 | // 3. Unfinishedness Indexers | ||
25781 | ////////// | ||
25782 | // 3.1 Unfinishedness Measured by Multiplicity | ||
25783 | ////////// | ||
25784 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
25785 | find interpretation(problem,interpretation); | ||
25786 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25787 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
25788 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
25789 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
25790 | check(numberOfExistingReferences < 1); | ||
25791 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
25792 | } | ||
25793 | |||
25794 | ////////// | ||
25795 | // 3.2 Unfinishedness Measured by WF Queries | ||
25796 | ////////// | ||
25797 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25798 | var_r1) | ||
25799 | { | ||
25800 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
25801 | } | ||
25802 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25803 | var_r) | ||
25804 | { | ||
25805 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
25806 | } | ||
25807 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25808 | var_t, var_e) | ||
25809 | { | ||
25810 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
25811 | } | ||
25812 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25813 | var_e) | ||
25814 | { | ||
25815 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
25816 | } | ||
25817 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25818 | var_e, var_t1, var_t2) | ||
25819 | { | ||
25820 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
25821 | } | ||
25822 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25823 | var_t, var_e) | ||
25824 | { | ||
25825 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
25826 | } | ||
25827 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25828 | var_t, var_f) | ||
25829 | { | ||
25830 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
25831 | } | ||
25832 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25833 | var_region) | ||
25834 | { | ||
25835 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
25836 | } | ||
25837 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25838 | var_c) | ||
25839 | { | ||
25840 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
25841 | } | ||
25842 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25843 | var_c) | ||
25844 | { | ||
25845 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
25846 | } | ||
25847 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25848 | var_s) | ||
25849 | { | ||
25850 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
25851 | } | ||
25852 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25853 | var_s) | ||
25854 | { | ||
25855 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
25856 | } | ||
25857 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25858 | var_s, var_v1, var_v2) | ||
25859 | { | ||
25860 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
25861 | } | ||
25862 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25863 | var_s) | ||
25864 | { | ||
25865 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
25866 | } | ||
25867 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25868 | var_s, var_v1, var_v2) | ||
25869 | { | ||
25870 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
25871 | } | ||
25872 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25873 | var_s, var_v) | ||
25874 | { | ||
25875 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
25876 | } | ||
25877 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25878 | var_s) | ||
25879 | { | ||
25880 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
25881 | } | ||
25882 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25883 | var_s1, var_s2) | ||
25884 | { | ||
25885 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
25886 | } | ||
25887 | |||
25888 | ////////// | ||
25889 | // 4. Refinement Indexers | ||
25890 | ////////// | ||
25891 | // 4.1 Object constructors | ||
25892 | ////////// | ||
25893 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
25894 | { | ||
25895 | find interpretation(problem,interpretation); | ||
25896 | find mustInstanceOfState_class(problem,interpretation,root); | ||
25897 | find mustExist(problem, interpretation, root); | ||
25898 | }or{ | ||
25899 | find interpretation(problem,interpretation); | ||
25900 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
25901 | find mustExist(problem, interpretation, root); | ||
25902 | }or{ | ||
25903 | find interpretation(problem,interpretation); | ||
25904 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
25905 | find mustExist(problem, interpretation, root); | ||
25906 | }or{ | ||
25907 | find interpretation(problem,interpretation); | ||
25908 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
25909 | find mustExist(problem, interpretation, root); | ||
25910 | }or{ | ||
25911 | find interpretation(problem,interpretation); | ||
25912 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
25913 | find mustExist(problem, interpretation, root); | ||
25914 | }or{ | ||
25915 | find interpretation(problem,interpretation); | ||
25916 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
25917 | find mustExist(problem, interpretation, root); | ||
25918 | }or{ | ||
25919 | find interpretation(problem,interpretation); | ||
25920 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
25921 | find mustExist(problem, interpretation, root); | ||
25922 | }or{ | ||
25923 | find interpretation(problem,interpretation); | ||
25924 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
25925 | find mustExist(problem, interpretation, root); | ||
25926 | }or{ | ||
25927 | find interpretation(problem,interpretation); | ||
25928 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
25929 | find mustExist(problem, interpretation, root); | ||
25930 | }or{ | ||
25931 | find interpretation(problem,interpretation); | ||
25932 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
25933 | find mustExist(problem, interpretation, root); | ||
25934 | }or{ | ||
25935 | find interpretation(problem,interpretation); | ||
25936 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
25937 | find mustExist(problem, interpretation, root); | ||
25938 | }or{ | ||
25939 | find interpretation(problem,interpretation); | ||
25940 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
25941 | find mustExist(problem, interpretation, root); | ||
25942 | }or{ | ||
25943 | find interpretation(problem,interpretation); | ||
25944 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
25945 | find mustExist(problem, interpretation, root); | ||
25946 | }or{ | ||
25947 | find interpretation(problem,interpretation); | ||
25948 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
25949 | find mustExist(problem, interpretation, root); | ||
25950 | }or{ | ||
25951 | find interpretation(problem,interpretation); | ||
25952 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
25953 | find mustExist(problem, interpretation, root); | ||
25954 | }or{ | ||
25955 | find interpretation(problem,interpretation); | ||
25956 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
25957 | find mustExist(problem, interpretation, root); | ||
25958 | }or{ | ||
25959 | find interpretation(problem,interpretation); | ||
25960 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
25961 | find mustExist(problem, interpretation, root); | ||
25962 | } | ||
25963 | pattern createObject_Statechart_class_UndefinedPart( | ||
25964 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25965 | typeInterpretation:PartialComplexTypeInterpretation) | ||
25966 | { | ||
25967 | find interpretation(problem,interpretation); | ||
25968 | neg find hasElementInContainment(problem,interpretation); | ||
25969 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25970 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
25971 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
25972 | find mayExist(problem, interpretation, newObject); | ||
25973 | neg find mustExist(problem, interpretation, newObject); | ||
25974 | } | ||
25975 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
25976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25977 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
25978 | container:DefinedElement) | ||
25979 | { | ||
25980 | find interpretation(problem,interpretation); | ||
25981 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25982 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
25983 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
25984 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
25985 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
25986 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
25987 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
25988 | find mustExist(problem, interpretation, container); | ||
25989 | neg find mustExist(problem, interpretation, newObject); | ||
25990 | } | ||
25991 | pattern createObject_Exit_class( | ||
25992 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25993 | typeInterpretation:PartialComplexTypeInterpretation) | ||
25994 | { | ||
25995 | find interpretation(problem,interpretation); | ||
25996 | neg find hasElementInContainment(problem,interpretation); | ||
25997 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25998 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
25999 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
26000 | find mayExist(problem, interpretation, newObject); | ||
26001 | neg find mustExist(problem, interpretation, newObject); | ||
26002 | } | ||
26003 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
26004 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26005 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26006 | container:DefinedElement) | ||
26007 | { | ||
26008 | find interpretation(problem,interpretation); | ||
26009 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26010 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
26011 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26012 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
26013 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
26014 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
26015 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
26016 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
26017 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
26018 | find mustExist(problem, interpretation, container); | ||
26019 | neg find mustExist(problem, interpretation, newObject); | ||
26020 | } | ||
26021 | pattern createObject_Transition_class( | ||
26022 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26023 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26024 | { | ||
26025 | find interpretation(problem,interpretation); | ||
26026 | neg find hasElementInContainment(problem,interpretation); | ||
26027 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26028 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
26029 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
26030 | find mayExist(problem, interpretation, newObject); | ||
26031 | neg find mustExist(problem, interpretation, newObject); | ||
26032 | } | ||
26033 | pattern createObject_State_class_by_vertices_reference_Region( | ||
26034 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26035 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26036 | container:DefinedElement) | ||
26037 | { | ||
26038 | find interpretation(problem,interpretation); | ||
26039 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26040 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
26041 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26042 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
26043 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
26044 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
26045 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
26046 | find mustExist(problem, interpretation, container); | ||
26047 | neg find mustExist(problem, interpretation, newObject); | ||
26048 | } | ||
26049 | pattern createObject_State_class( | ||
26050 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26051 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26052 | { | ||
26053 | find interpretation(problem,interpretation); | ||
26054 | neg find hasElementInContainment(problem,interpretation); | ||
26055 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26056 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
26057 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
26058 | find mayExist(problem, interpretation, newObject); | ||
26059 | neg find mustExist(problem, interpretation, newObject); | ||
26060 | } | ||
26061 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
26062 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26063 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26064 | container:DefinedElement) | ||
26065 | { | ||
26066 | find interpretation(problem,interpretation); | ||
26067 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26068 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
26069 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26070 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
26071 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
26072 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
26073 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
26074 | find mustExist(problem, interpretation, container); | ||
26075 | neg find mustExist(problem, interpretation, newObject); | ||
26076 | } | ||
26077 | pattern createObject_Choice_class( | ||
26078 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26079 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26080 | { | ||
26081 | find interpretation(problem,interpretation); | ||
26082 | neg find hasElementInContainment(problem,interpretation); | ||
26083 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26084 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
26085 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
26086 | find mayExist(problem, interpretation, newObject); | ||
26087 | neg find mustExist(problem, interpretation, newObject); | ||
26088 | } | ||
26089 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
26090 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26091 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26092 | container:DefinedElement) | ||
26093 | { | ||
26094 | find interpretation(problem,interpretation); | ||
26095 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26096 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
26097 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26098 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
26099 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
26100 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
26101 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
26102 | find mustExist(problem, interpretation, container); | ||
26103 | neg find mustExist(problem, interpretation, newObject); | ||
26104 | } | ||
26105 | pattern createObject_Entry_class( | ||
26106 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26107 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26108 | { | ||
26109 | find interpretation(problem,interpretation); | ||
26110 | neg find hasElementInContainment(problem,interpretation); | ||
26111 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26112 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
26113 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
26114 | find mayExist(problem, interpretation, newObject); | ||
26115 | neg find mustExist(problem, interpretation, newObject); | ||
26116 | } | ||
26117 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
26118 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26119 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26120 | container:DefinedElement) | ||
26121 | { | ||
26122 | find interpretation(problem,interpretation); | ||
26123 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26124 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
26125 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26126 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
26127 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
26128 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
26129 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
26130 | find mustExist(problem, interpretation, container); | ||
26131 | neg find mustExist(problem, interpretation, newObject); | ||
26132 | } | ||
26133 | pattern createObject_FinalState_class( | ||
26134 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26135 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26136 | { | ||
26137 | find interpretation(problem,interpretation); | ||
26138 | neg find hasElementInContainment(problem,interpretation); | ||
26139 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26140 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
26141 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
26142 | find mayExist(problem, interpretation, newObject); | ||
26143 | neg find mustExist(problem, interpretation, newObject); | ||
26144 | } | ||
26145 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
26146 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26147 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26148 | container:DefinedElement) | ||
26149 | { | ||
26150 | find interpretation(problem,interpretation); | ||
26151 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26152 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
26153 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26154 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
26155 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
26156 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
26157 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
26158 | find mustExist(problem, interpretation, container); | ||
26159 | neg find mustExist(problem, interpretation, newObject); | ||
26160 | } | ||
26161 | pattern createObject_Region_class( | ||
26162 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26163 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26164 | { | ||
26165 | find interpretation(problem,interpretation); | ||
26166 | neg find hasElementInContainment(problem,interpretation); | ||
26167 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26168 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
26169 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
26170 | find mayExist(problem, interpretation, newObject); | ||
26171 | neg find mustExist(problem, interpretation, newObject); | ||
26172 | } | ||
26173 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
26174 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26175 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26176 | container:DefinedElement) | ||
26177 | { | ||
26178 | find interpretation(problem,interpretation); | ||
26179 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26180 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
26181 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26182 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
26183 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
26184 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
26185 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
26186 | find mustExist(problem, interpretation, container); | ||
26187 | neg find mustExist(problem, interpretation, newObject); | ||
26188 | } | ||
26189 | pattern createObject_Synchronization_class( | ||
26190 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26191 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26192 | { | ||
26193 | find interpretation(problem,interpretation); | ||
26194 | neg find hasElementInContainment(problem,interpretation); | ||
26195 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26196 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
26197 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
26198 | find mayExist(problem, interpretation, newObject); | ||
26199 | neg find mustExist(problem, interpretation, newObject); | ||
26200 | } | ||
26201 | |||
26202 | ////////// | ||
26203 | // 4.2 Type refinement | ||
26204 | ////////// | ||
26205 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26206 | find interpretation(problem,interpretation); | ||
26207 | PartialInterpretation.newElements(interpretation,element); | ||
26208 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
26209 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
26210 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26211 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
26212 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26213 | } | ||
26214 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26215 | find interpretation(problem,interpretation); | ||
26216 | PartialInterpretation.newElements(interpretation,element); | ||
26217 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
26218 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
26219 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26220 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
26221 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
26222 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
26223 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
26224 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26225 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
26226 | } | ||
26227 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26228 | find interpretation(problem,interpretation); | ||
26229 | PartialInterpretation.newElements(interpretation,element); | ||
26230 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
26231 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26232 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
26233 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
26234 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26235 | } | ||
26236 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26237 | find interpretation(problem,interpretation); | ||
26238 | PartialInterpretation.newElements(interpretation,element); | ||
26239 | find mayInstanceOfState_class(problem,interpretation,element); | ||
26240 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
26241 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26242 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
26243 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
26244 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
26245 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26246 | } | ||
26247 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26248 | find interpretation(problem,interpretation); | ||
26249 | PartialInterpretation.newElements(interpretation,element); | ||
26250 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
26251 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
26252 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26253 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
26254 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
26255 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
26256 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
26257 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26258 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
26259 | } | ||
26260 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26261 | find interpretation(problem,interpretation); | ||
26262 | PartialInterpretation.newElements(interpretation,element); | ||
26263 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
26264 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
26265 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26266 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
26267 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
26268 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
26269 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
26270 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26271 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
26272 | } | ||
26273 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26274 | find interpretation(problem,interpretation); | ||
26275 | PartialInterpretation.newElements(interpretation,element); | ||
26276 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
26277 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
26278 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26279 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
26280 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
26281 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26282 | } | ||
26283 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26284 | find interpretation(problem,interpretation); | ||
26285 | PartialInterpretation.newElements(interpretation,element); | ||
26286 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
26287 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26288 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
26289 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
26290 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26291 | } | ||
26292 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26293 | find interpretation(problem,interpretation); | ||
26294 | PartialInterpretation.newElements(interpretation,element); | ||
26295 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
26296 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
26297 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
26298 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
26299 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
26300 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
26301 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
26302 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
26303 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
26304 | } | ||
26305 | |||
26306 | ////////// | ||
26307 | // 4.3 Relation refinement | ||
26308 | ////////// | ||
26309 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
26310 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26311 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
26312 | from: DefinedElement, to: DefinedElement) | ||
26313 | { | ||
26314 | find interpretation(problem,interpretation); | ||
26315 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
26316 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
26317 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
26318 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
26319 | find mustExist(problem, interpretation, from); | ||
26320 | find mustExist(problem, interpretation, to); | ||
26321 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
26322 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
26323 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
26324 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
26325 | } | ||