aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/Metrics-Calculation/SocialNetwork_plugin/debug/generated3valued.vql_deactivated
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/Metrics-Calculation/SocialNetwork_plugin/debug/generated3valued.vql_deactivated')
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/debug/generated3valued.vql_deactivated2004
1 files changed, 2004 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/debug/generated3valued.vql_deactivated b/Metrics/Metrics-Calculation/SocialNetwork_plugin/debug/generated3valued.vql_deactivated
new file mode 100644
index 00000000..d553f3cf
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/debug/generated3valued.vql_deactivated
@@ -0,0 +1,2004 @@
1import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
2import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
3import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
4
5//////////
6// 0. Util
7//////////
8private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
9 PartialInterpretation.problem(interpretation,problem);
10}
11
12/////////////////////////
13// 0.1 Existence
14/////////////////////////
15/** [[exist(element)]]=1 */
16private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
17 find interpretation(problem,interpretation);
18 LogicProblem.elements(problem,element);
19} or {
20 find interpretation(problem,interpretation);
21 PartialInterpretation.newElements(interpretation,element);
22}
23
24/** [[exist(element)]]>=1/2 */
25private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
26 find mustExist(problem,interpretation,element);
27} or {
28 find interpretation(problem,interpretation);
29 neg find elementCloseWorld(element);
30 PartialInterpretation.openWorldElements(interpretation,element);
31}
32
33private pattern elementCloseWorld(element:DefinedElement) {
34 PartialInterpretation.openWorldElements(i,element);
35 PartialInterpretation.maxNewElements(i,0);
36} or {
37 Scope.targetTypeInterpretation(scope,interpretation);
38 PartialTypeInterpratation.elements(interpretation,element);
39 Scope.maxNewElements(scope,0);
40}
41
42////////////////////////
43// 0.2 Equivalence
44////////////////////////
45pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement)
46// For non-primitive type. Boolean types always must equivalent or cannot equivalent
47{
48 find mayExist(problem,interpretation,a);
49 find mayExist(problem,interpretation,b);
50 a == b;
51}
52
53pattern mustEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
54// For non-primitive and Boolean primitive type
55 find mustExist(problem,interpretation,a);
56 find mustExist(problem,interpretation,b);
57 a == b;
58}
59
60//////////
61// 1. Problem-Specific Base Indexers
62//////////
63// 1.1 Type Indexers
64//////////
65// 1.1.1 Required Patterns by TypeIndexer
66//////////
67
68private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
69 find interpretation(problem,interpretation);
70 LogicProblem.types(problem,type);
71 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
72 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
73}
74
75private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
76 find interpretation(problem,interpretation);
77 LogicProblem.types(problem,type);
78 TypeDefinition.elements(type,element);
79} or {
80 find interpretation(problem,interpretation);
81 find typeInterpretation(problem,interpretation,type,typeInterpretation);
82 PartialComplexTypeInterpretation.elements(typeInterpretation,element);
83}
84
85private pattern isPrimitive(element: PrimitiveElement) {
86 PrimitiveElement(element);
87}
88
89//////////
90// 1.1.2 primitive Type Indexers
91//////////
92// Currently unused. Refer primitive types as:
93// > PrimitiveElement(element)
94// specific types are referred as:
95// > BooleanElement(variableName)
96// > IntegerElement(variableName)
97// > RealElement(variableName)
98// > StringElement(variableName)
99// And their value as
100// > BooleanElement.value(variableName,value)
101// > IntegerElement.value(variableName,value)
102// > RealElement.value(variableName,value)
103// > StringElement.value(variableName,value)
104// Whether a value is set is defined by:
105// > PrimitiveElement.valueSet(variableName,isFilled);
106
107//////////
108// 1.1.3 domain-specific Type Indexers
109//////////
110/**
111 * An element must be an instance of type "User class".
112 */
113private pattern mustInstanceOfUser_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
114 Type.name(type,"User class");
115 find directInstanceOf(problem,interpretation,element,type);
116}
117private pattern scopeDisallowsNewUser_class(problem:LogicProblem, interpretation:PartialInterpretation) {
118 find interpretation(problem,interpretation);
119 PartialInterpretation.scopes(interpretation,scope);
120 Scope.targetTypeInterpretation(scope,typeInterpretation);
121 Scope.maxNewElements(scope,0);
122 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
123 Type.name(type,"User class");
124}
125
126/**
127 * An element may be an instance of type "User class".
128 */
129private pattern mayInstanceOfUser_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
130{
131 find interpretation(problem,interpretation);
132 PartialInterpretation.newElements(interpretation,element);
133 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
134 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
135 neg find mustInstanceOfProject_class(problem,interpretation,element);
136 neg find mustInstanceOfCommit_class(problem,interpretation,element);
137 neg find mustInstanceOfIssue_class(problem,interpretation,element);
138 neg find scopeDisallowsNewUser_class(problem, interpretation);
139 neg find isPrimitive(element);
140} or {
141 find interpretation(problem,interpretation);
142 PartialInterpretation.openWorldElements(interpretation,element);
143 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
144 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
145 neg find mustInstanceOfProject_class(problem,interpretation,element);
146 neg find mustInstanceOfCommit_class(problem,interpretation,element);
147 neg find mustInstanceOfIssue_class(problem,interpretation,element);
148 neg find scopeDisallowsNewUser_class(problem, interpretation);
149 neg find isPrimitive(element);
150} or
151{ find mustInstanceOfUser_class(problem,interpretation,element); }
152/**
153 * An element must be an instance of type "Project class".
154 */
155private pattern mustInstanceOfProject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
156 Type.name(type,"Project class");
157 find directInstanceOf(problem,interpretation,element,type);
158}
159private pattern scopeDisallowsNewProject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
160 find interpretation(problem,interpretation);
161 PartialInterpretation.scopes(interpretation,scope);
162 Scope.targetTypeInterpretation(scope,typeInterpretation);
163 Scope.maxNewElements(scope,0);
164 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
165 Type.name(type,"Project class");
166}
167
168/**
169 * An element may be an instance of type "Project class".
170 */
171private pattern mayInstanceOfProject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
172{
173 find interpretation(problem,interpretation);
174 PartialInterpretation.newElements(interpretation,element);
175 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
176 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
177 neg find mustInstanceOfProject_class_UndefinedPart(problem,interpretation,element);
178 neg find mustInstanceOfCommit_class(problem,interpretation,element);
179 neg find mustInstanceOfIssue_class(problem,interpretation,element);
180 neg find mustInstanceOfUser_class(problem,interpretation,element);
181 neg find scopeDisallowsNewProject_class(problem, interpretation);
182 neg find isPrimitive(element);
183} or {
184 find interpretation(problem,interpretation);
185 PartialInterpretation.openWorldElements(interpretation,element);
186 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
187 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
188 neg find mustInstanceOfProject_class_UndefinedPart(problem,interpretation,element);
189 neg find mustInstanceOfCommit_class(problem,interpretation,element);
190 neg find mustInstanceOfIssue_class(problem,interpretation,element);
191 neg find mustInstanceOfUser_class(problem,interpretation,element);
192 neg find scopeDisallowsNewProject_class(problem, interpretation);
193 neg find isPrimitive(element);
194} or
195{ find mustInstanceOfProject_class(problem,interpretation,element); }
196/**
197 * An element must be an instance of type "Commit class".
198 */
199private pattern mustInstanceOfCommit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
200 Type.name(type,"Commit class");
201 find directInstanceOf(problem,interpretation,element,type);
202}
203private pattern scopeDisallowsNewCommit_class(problem:LogicProblem, interpretation:PartialInterpretation) {
204 find interpretation(problem,interpretation);
205 PartialInterpretation.scopes(interpretation,scope);
206 Scope.targetTypeInterpretation(scope,typeInterpretation);
207 Scope.maxNewElements(scope,0);
208 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
209 Type.name(type,"Commit class");
210}
211
212/**
213 * An element may be an instance of type "Commit class".
214 */
215private pattern mayInstanceOfCommit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
216{
217 find interpretation(problem,interpretation);
218 PartialInterpretation.newElements(interpretation,element);
219 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
220 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
221 neg find mustInstanceOfProject_class(problem,interpretation,element);
222 neg find mustInstanceOfUser_class(problem,interpretation,element);
223 neg find mustInstanceOfIssue_class(problem,interpretation,element);
224 neg find scopeDisallowsNewCommit_class(problem, interpretation);
225 neg find isPrimitive(element);
226} or {
227 find interpretation(problem,interpretation);
228 PartialInterpretation.openWorldElements(interpretation,element);
229 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
230 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
231 neg find mustInstanceOfProject_class(problem,interpretation,element);
232 neg find mustInstanceOfUser_class(problem,interpretation,element);
233 neg find mustInstanceOfIssue_class(problem,interpretation,element);
234 neg find scopeDisallowsNewCommit_class(problem, interpretation);
235 neg find isPrimitive(element);
236} or
237{ find mustInstanceOfCommit_class(problem,interpretation,element); }
238/**
239 * An element must be an instance of type "Issue class".
240 */
241private pattern mustInstanceOfIssue_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
242 Type.name(type,"Issue class");
243 find directInstanceOf(problem,interpretation,element,type);
244}
245private pattern scopeDisallowsNewIssue_class(problem:LogicProblem, interpretation:PartialInterpretation) {
246 find interpretation(problem,interpretation);
247 PartialInterpretation.scopes(interpretation,scope);
248 Scope.targetTypeInterpretation(scope,typeInterpretation);
249 Scope.maxNewElements(scope,0);
250 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
251 Type.name(type,"Issue class");
252}
253
254/**
255 * An element may be an instance of type "Issue class".
256 */
257private pattern mayInstanceOfIssue_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
258{
259 find interpretation(problem,interpretation);
260 PartialInterpretation.newElements(interpretation,element);
261 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
262 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
263 neg find mustInstanceOfProject_class(problem,interpretation,element);
264 neg find mustInstanceOfCommit_class(problem,interpretation,element);
265 neg find mustInstanceOfUser_class(problem,interpretation,element);
266 neg find scopeDisallowsNewIssue_class(problem, interpretation);
267 neg find isPrimitive(element);
268} or {
269 find interpretation(problem,interpretation);
270 PartialInterpretation.openWorldElements(interpretation,element);
271 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
272 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
273 neg find mustInstanceOfProject_class(problem,interpretation,element);
274 neg find mustInstanceOfCommit_class(problem,interpretation,element);
275 neg find mustInstanceOfUser_class(problem,interpretation,element);
276 neg find scopeDisallowsNewIssue_class(problem, interpretation);
277 neg find isPrimitive(element);
278} or
279{ find mustInstanceOfIssue_class(problem,interpretation,element); }
280/**
281 * An element must be an instance of type "PullRequest class".
282 */
283private pattern mustInstanceOfPullRequest_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
284 Type.name(type,"PullRequest class");
285 find directInstanceOf(problem,interpretation,element,type);
286}
287private pattern scopeDisallowsNewPullRequest_class(problem:LogicProblem, interpretation:PartialInterpretation) {
288 find interpretation(problem,interpretation);
289 PartialInterpretation.scopes(interpretation,scope);
290 Scope.targetTypeInterpretation(scope,typeInterpretation);
291 Scope.maxNewElements(scope,0);
292 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
293 Type.name(type,"PullRequest class");
294}
295
296/**
297 * An element may be an instance of type "PullRequest class".
298 */
299private pattern mayInstanceOfPullRequest_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
300{
301 find interpretation(problem,interpretation);
302 PartialInterpretation.newElements(interpretation,element);
303 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
304 neg find mustInstanceOfProject_class(problem,interpretation,element);
305 neg find mustInstanceOfCommit_class(problem,interpretation,element);
306 neg find mustInstanceOfIssue_class(problem,interpretation,element);
307 neg find mustInstanceOfUser_class(problem,interpretation,element);
308 neg find scopeDisallowsNewPullRequest_class(problem, interpretation);
309 neg find isPrimitive(element);
310} or {
311 find interpretation(problem,interpretation);
312 PartialInterpretation.openWorldElements(interpretation,element);
313 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
314 neg find mustInstanceOfProject_class(problem,interpretation,element);
315 neg find mustInstanceOfCommit_class(problem,interpretation,element);
316 neg find mustInstanceOfIssue_class(problem,interpretation,element);
317 neg find mustInstanceOfUser_class(problem,interpretation,element);
318 neg find scopeDisallowsNewPullRequest_class(problem, interpretation);
319 neg find isPrimitive(element);
320} or
321{ find mustInstanceOfPullRequest_class(problem,interpretation,element); }
322/**
323 * An element must be an instance of type "IssueEvent class".
324 */
325private pattern mustInstanceOfIssueEvent_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
326 Type.name(type,"IssueEvent class");
327 find directInstanceOf(problem,interpretation,element,type);
328}
329private pattern scopeDisallowsNewIssueEvent_class(problem:LogicProblem, interpretation:PartialInterpretation) {
330 find interpretation(problem,interpretation);
331 PartialInterpretation.scopes(interpretation,scope);
332 Scope.targetTypeInterpretation(scope,typeInterpretation);
333 Scope.maxNewElements(scope,0);
334 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
335 Type.name(type,"IssueEvent class");
336}
337
338/**
339 * An element may be an instance of type "IssueEvent class".
340 */
341private pattern mayInstanceOfIssueEvent_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
342{
343 find interpretation(problem,interpretation);
344 PartialInterpretation.newElements(interpretation,element);
345 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
346 neg find mustInstanceOfProject_class(problem,interpretation,element);
347 neg find mustInstanceOfCommit_class(problem,interpretation,element);
348 neg find mustInstanceOfIssue_class(problem,interpretation,element);
349 neg find mustInstanceOfUser_class(problem,interpretation,element);
350 neg find scopeDisallowsNewIssueEvent_class(problem, interpretation);
351 neg find isPrimitive(element);
352} or {
353 find interpretation(problem,interpretation);
354 PartialInterpretation.openWorldElements(interpretation,element);
355 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
356 neg find mustInstanceOfProject_class(problem,interpretation,element);
357 neg find mustInstanceOfCommit_class(problem,interpretation,element);
358 neg find mustInstanceOfIssue_class(problem,interpretation,element);
359 neg find mustInstanceOfUser_class(problem,interpretation,element);
360 neg find scopeDisallowsNewIssueEvent_class(problem, interpretation);
361 neg find isPrimitive(element);
362} or
363{ find mustInstanceOfIssueEvent_class(problem,interpretation,element); }
364/**
365 * An element must be an instance of type "Action enum".
366 */
367private pattern mustInstanceOfAction_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
368 Type.name(type,"Action enum");
369 find directInstanceOf(problem,interpretation,element,type);
370}
371private pattern scopeDisallowsNewAction_enum(problem:LogicProblem, interpretation:PartialInterpretation) {
372 find interpretation(problem,interpretation);
373 PartialInterpretation.scopes(interpretation,scope);
374 Scope.targetTypeInterpretation(scope,typeInterpretation);
375 Scope.maxNewElements(scope,0);
376 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
377 Type.name(type,"Action enum");
378}
379
380/**
381 * An element may be an instance of type "Action enum".
382 */
383private pattern mayInstanceOfAction_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
384{ find mustInstanceOfAction_enum(problem,interpretation,element); }
385/**
386 * An element must be an instance of type "Project class DefinedPart".
387 */
388private pattern mustInstanceOfProject_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
389 Type.name(type,"Project class DefinedPart");
390 find directInstanceOf(problem,interpretation,element,type);
391}
392private pattern scopeDisallowsNewProject_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
393 find interpretation(problem,interpretation);
394 PartialInterpretation.scopes(interpretation,scope);
395 Scope.targetTypeInterpretation(scope,typeInterpretation);
396 Scope.maxNewElements(scope,0);
397 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
398 Type.name(type,"Project class DefinedPart");
399}
400
401/**
402 * An element may be an instance of type "Project class DefinedPart".
403 */
404private pattern mayInstanceOfProject_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
405{ find mustInstanceOfProject_class_DefinedPart(problem,interpretation,element); }
406/**
407 * An element must be an instance of type "Project class UndefinedPart".
408 */
409private pattern mustInstanceOfProject_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
410 Type.name(type,"Project class UndefinedPart");
411 find directInstanceOf(problem,interpretation,element,type);
412}
413private pattern scopeDisallowsNewProject_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
414 find interpretation(problem,interpretation);
415 PartialInterpretation.scopes(interpretation,scope);
416 Scope.targetTypeInterpretation(scope,typeInterpretation);
417 Scope.maxNewElements(scope,0);
418 PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
419 Type.name(type,"Project class UndefinedPart");
420}
421
422/**
423 * An element may be an instance of type "Project class UndefinedPart".
424 */
425private pattern mayInstanceOfProject_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
426{
427 find interpretation(problem,interpretation);
428 PartialInterpretation.newElements(interpretation,element);
429 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
430 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
431 neg find mustInstanceOfCommit_class(problem,interpretation,element);
432 neg find mustInstanceOfIssue_class(problem,interpretation,element);
433 neg find mustInstanceOfUser_class(problem,interpretation,element);
434 neg find scopeDisallowsNewProject_class_UndefinedPart(problem, interpretation);
435 neg find isPrimitive(element);
436} or {
437 find interpretation(problem,interpretation);
438 PartialInterpretation.openWorldElements(interpretation,element);
439 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
440 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
441 neg find mustInstanceOfCommit_class(problem,interpretation,element);
442 neg find mustInstanceOfIssue_class(problem,interpretation,element);
443 neg find mustInstanceOfUser_class(problem,interpretation,element);
444 neg find scopeDisallowsNewProject_class_UndefinedPart(problem, interpretation);
445 neg find isPrimitive(element);
446} or
447{ find mustInstanceOfProject_class_UndefinedPart(problem,interpretation,element); }
448
449//////////
450// 1.2 Relation Declaration Indexers
451//////////
452/**
453 * Matcher for detecting tuples t where []issue reference Project(source,target)
454 */
455private pattern mustInRelationissue_reference_Project(
456 problem:LogicProblem, interpretation:PartialInterpretation,
457 source: DefinedElement, target:DefinedElement)
458{
459 find interpretation(problem,interpretation);
460 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
461 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"issue reference Project");
462 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
463 BinaryElementRelationLink.param1(link,source);
464 BinaryElementRelationLink.param2(link,target);
465}
466/**
467 * Matcher for detecting tuples t where <>issue reference Project(source,target)
468 */
469private pattern mayInRelationissue_reference_Project(
470 problem:LogicProblem, interpretation:PartialInterpretation,
471 source: DefinedElement, target:DefinedElement)
472{
473 find interpretation(problem,interpretation);
474 // The two endpoint of the link have to exist
475 find mayExist(problem, interpretation, source);
476 find mayExist(problem, interpretation, target);
477 // Type consistency
478 find mayInstanceOfProject_class(problem,interpretation,source);
479 find mayInstanceOfIssue_class(problem,interpretation,target);
480 // The reference is containment, then a new reference cannot be create if:
481 // 1. Multiple parents
482 neg find mustContains4(problem,interpretation,_,target);
483 // 2. Circle in the containment hierarchy
484 neg find mustTransitiveContains(source,target);
485} or {
486 find mustInRelationissue_reference_Project(problem,interpretation,source,target);
487}
488/**
489 * Matcher for detecting tuples t where []projectMembers reference Project(source,target)
490 */
491private pattern mustInRelationprojectMembers_reference_Project(
492 problem:LogicProblem, interpretation:PartialInterpretation,
493 source: DefinedElement, target:DefinedElement)
494{
495 find interpretation(problem,interpretation);
496 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
497 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"projectMembers reference Project");
498 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
499 BinaryElementRelationLink.param1(link,source);
500 BinaryElementRelationLink.param2(link,target);
501}
502/**
503 * Matcher for detecting tuples t where <>projectMembers reference Project(source,target)
504 */
505private pattern mayInRelationprojectMembers_reference_Project(
506 problem:LogicProblem, interpretation:PartialInterpretation,
507 source: DefinedElement, target:DefinedElement)
508{
509 find interpretation(problem,interpretation);
510 // The two endpoint of the link have to exist
511 find mayExist(problem, interpretation, source);
512 find mayExist(problem, interpretation, target);
513 // Type consistency
514 find mayInstanceOfProject_class(problem,interpretation,source);
515 find mayInstanceOfUser_class(problem,interpretation,target);
516 // The reference is containment, then a new reference cannot be create if:
517 // 1. Multiple parents
518 neg find mustContains4(problem,interpretation,_,target);
519 // 2. Circle in the containment hierarchy
520 neg find mustTransitiveContains(source,target);
521} or {
522 find mustInRelationprojectMembers_reference_Project(problem,interpretation,source,target);
523}
524/**
525 * Matcher for detecting tuples t where []commits reference Project(source,target)
526 */
527private pattern mustInRelationcommits_reference_Project(
528 problem:LogicProblem, interpretation:PartialInterpretation,
529 source: DefinedElement, target:DefinedElement)
530{
531 find interpretation(problem,interpretation);
532 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
533 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"commits reference Project");
534 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
535 BinaryElementRelationLink.param1(link,source);
536 BinaryElementRelationLink.param2(link,target);
537}
538/**
539 * Matcher for detecting tuples t where <>commits reference Project(source,target)
540 */
541private pattern mayInRelationcommits_reference_Project(
542 problem:LogicProblem, interpretation:PartialInterpretation,
543 source: DefinedElement, target:DefinedElement)
544{
545 find interpretation(problem,interpretation);
546 // The two endpoint of the link have to exist
547 find mayExist(problem, interpretation, source);
548 find mayExist(problem, interpretation, target);
549 // Type consistency
550 find mayInstanceOfProject_class(problem,interpretation,source);
551 find mayInstanceOfCommit_class(problem,interpretation,target);
552 // The reference is containment, then a new reference cannot be create if:
553 // 1. Multiple parents
554 neg find mustContains4(problem,interpretation,_,target);
555 // 2. Circle in the containment hierarchy
556 neg find mustTransitiveContains(source,target);
557} or {
558 find mustInRelationcommits_reference_Project(problem,interpretation,source,target);
559}
560/**
561 * Matcher for detecting tuples t where []committer reference Commit(source,target)
562 */
563private pattern mustInRelationcommitter_reference_Commit(
564 problem:LogicProblem, interpretation:PartialInterpretation,
565 source: DefinedElement, target:DefinedElement)
566{
567 find interpretation(problem,interpretation);
568 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
569 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"committer reference Commit");
570 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
571 BinaryElementRelationLink.param1(link,source);
572 BinaryElementRelationLink.param2(link,target);
573}
574/**
575 * Matcher for detecting tuples t where <>committer reference Commit(source,target)
576 */
577private pattern mayInRelationcommitter_reference_Commit(
578 problem:LogicProblem, interpretation:PartialInterpretation,
579 source: DefinedElement, target:DefinedElement)
580{
581 find interpretation(problem,interpretation);
582 // The two endpoint of the link have to exist
583 find mayExist(problem, interpretation, source);
584 find mayExist(problem, interpretation, target);
585 // Type consistency
586 find mayInstanceOfCommit_class(problem,interpretation,source);
587 find mayInstanceOfUser_class(problem,interpretation,target);
588 // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
589 // the upper bound of the multiplicity should be considered.
590 numberOfExistingReferences == count find mustInRelationcommitter_reference_Commit(problem,interpretation,source,_);
591 numberOfExistingReferences != 1;
592} or {
593 find mustInRelationcommitter_reference_Commit(problem,interpretation,source,target);
594}
595/**
596 * Matcher for detecting tuples t where []parents reference Commit(source,target)
597 */
598private pattern mustInRelationparents_reference_Commit(
599 problem:LogicProblem, interpretation:PartialInterpretation,
600 source: DefinedElement, target:DefinedElement)
601{
602 find interpretation(problem,interpretation);
603 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
604 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parents reference Commit");
605 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
606 BinaryElementRelationLink.param1(link,source);
607 BinaryElementRelationLink.param2(link,target);
608}
609/**
610 * Matcher for detecting tuples t where <>parents reference Commit(source,target)
611 */
612private pattern mayInRelationparents_reference_Commit(
613 problem:LogicProblem, interpretation:PartialInterpretation,
614 source: DefinedElement, target:DefinedElement)
615{
616 find interpretation(problem,interpretation);
617 // The two endpoint of the link have to exist
618 find mayExist(problem, interpretation, source);
619 find mayExist(problem, interpretation, target);
620 // Type consistency
621 find mayInstanceOfCommit_class(problem,interpretation,source);
622 find mayInstanceOfCommit_class(problem,interpretation,target);
623 // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
624 // the upper bound of the multiplicity should be considered.
625 numberOfExistingReferences == count find mustInRelationparents_reference_Commit(problem,interpretation,source,_);
626 numberOfExistingReferences != 2;
627} or {
628 find mustInRelationparents_reference_Commit(problem,interpretation,source,target);
629}
630/**
631 * Matcher for detecting tuples t where []pullrequest reference Commit(source,target)
632 */
633private pattern mustInRelationpullrequest_reference_Commit(
634 problem:LogicProblem, interpretation:PartialInterpretation,
635 source: DefinedElement, target:DefinedElement)
636{
637 find interpretation(problem,interpretation);
638 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
639 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"pullrequest reference Commit");
640 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
641 BinaryElementRelationLink.param1(link,source);
642 BinaryElementRelationLink.param2(link,target);
643}
644/**
645 * Matcher for detecting tuples t where <>pullrequest reference Commit(source,target)
646 */
647private pattern mayInRelationpullrequest_reference_Commit(
648 problem:LogicProblem, interpretation:PartialInterpretation,
649 source: DefinedElement, target:DefinedElement)
650{
651 find interpretation(problem,interpretation);
652 // The two endpoint of the link have to exist
653 find mayExist(problem, interpretation, source);
654 find mayExist(problem, interpretation, target);
655 // Type consistency
656 find mayInstanceOfCommit_class(problem,interpretation,source);
657 find mayInstanceOfPullRequest_class(problem,interpretation,target);
658 // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
659 // the upper bound of the multiplicity should be considered.
660 numberOfExistingReferences == count find mustInRelationpullrequest_reference_Commit(problem,interpretation,source,_);
661 numberOfExistingReferences != 1;
662 // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
663 // the upper bound of the opposite reference multiplicity should be considered.
664 numberOfExistingOppositeReferences == count find mustInRelationcommit_reference_PullRequest(problem,interpretation,target,_);
665 numberOfExistingOppositeReferences != 1;
666} or {
667 find mustInRelationpullrequest_reference_Commit(problem,interpretation,source,target);
668}
669/**
670 * Matcher for detecting tuples t where []pullrequest reference Issue(source,target)
671 */
672private pattern mustInRelationpullrequest_reference_Issue(
673 problem:LogicProblem, interpretation:PartialInterpretation,
674 source: DefinedElement, target:DefinedElement)
675{
676 find interpretation(problem,interpretation);
677 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
678 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"pullrequest reference Issue");
679 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
680 BinaryElementRelationLink.param1(link,source);
681 BinaryElementRelationLink.param2(link,target);
682}
683/**
684 * Matcher for detecting tuples t where <>pullrequest reference Issue(source,target)
685 */
686private pattern mayInRelationpullrequest_reference_Issue(
687 problem:LogicProblem, interpretation:PartialInterpretation,
688 source: DefinedElement, target:DefinedElement)
689{
690 find interpretation(problem,interpretation);
691 // The two endpoint of the link have to exist
692 find mayExist(problem, interpretation, source);
693 find mayExist(problem, interpretation, target);
694 // Type consistency
695 find mayInstanceOfIssue_class(problem,interpretation,source);
696 find mayInstanceOfPullRequest_class(problem,interpretation,target);
697 // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
698 // the upper bound of the multiplicity should be considered.
699 numberOfExistingReferences == count find mustInRelationpullrequest_reference_Issue(problem,interpretation,source,_);
700 numberOfExistingReferences != 1;
701 // The reference is containment, then a new reference cannot be create if:
702 // 1. Multiple parents
703 neg find mustContains4(problem,interpretation,_,target);
704 // 2. Circle in the containment hierarchy
705 neg find mustTransitiveContains(source,target);
706} or {
707 find mustInRelationpullrequest_reference_Issue(problem,interpretation,source,target);
708}
709/**
710 * Matcher for detecting tuples t where []issueevent reference Issue(source,target)
711 */
712private pattern mustInRelationissueevent_reference_Issue(
713 problem:LogicProblem, interpretation:PartialInterpretation,
714 source: DefinedElement, target:DefinedElement)
715{
716 find interpretation(problem,interpretation);
717 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
718 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"issueevent reference Issue");
719 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
720 BinaryElementRelationLink.param1(link,source);
721 BinaryElementRelationLink.param2(link,target);
722}
723/**
724 * Matcher for detecting tuples t where <>issueevent reference Issue(source,target)
725 */
726private pattern mayInRelationissueevent_reference_Issue(
727 problem:LogicProblem, interpretation:PartialInterpretation,
728 source: DefinedElement, target:DefinedElement)
729{
730 find interpretation(problem,interpretation);
731 // The two endpoint of the link have to exist
732 find mayExist(problem, interpretation, source);
733 find mayExist(problem, interpretation, target);
734 // Type consistency
735 find mayInstanceOfIssue_class(problem,interpretation,source);
736 find mayInstanceOfIssueEvent_class(problem,interpretation,target);
737 // The reference is containment, then a new reference cannot be create if:
738 // 1. Multiple parents
739 neg find mustContains4(problem,interpretation,_,target);
740 // 2. Circle in the containment hierarchy
741 neg find mustTransitiveContains(source,target);
742} or {
743 find mustInRelationissueevent_reference_Issue(problem,interpretation,source,target);
744}
745/**
746 * Matcher for detecting tuples t where []commit reference PullRequest(source,target)
747 */
748private pattern mustInRelationcommit_reference_PullRequest(
749 problem:LogicProblem, interpretation:PartialInterpretation,
750 source: DefinedElement, target:DefinedElement)
751{
752 find interpretation(problem,interpretation);
753 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
754 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"commit reference PullRequest");
755 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
756 BinaryElementRelationLink.param1(link,source);
757 BinaryElementRelationLink.param2(link,target);
758}
759/**
760 * Matcher for detecting tuples t where <>commit reference PullRequest(source,target)
761 */
762private pattern mayInRelationcommit_reference_PullRequest(
763 problem:LogicProblem, interpretation:PartialInterpretation,
764 source: DefinedElement, target:DefinedElement)
765{
766 find interpretation(problem,interpretation);
767 // The two endpoint of the link have to exist
768 find mayExist(problem, interpretation, source);
769 find mayExist(problem, interpretation, target);
770 // Type consistency
771 find mayInstanceOfPullRequest_class(problem,interpretation,source);
772 find mayInstanceOfCommit_class(problem,interpretation,target);
773 // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
774 // the upper bound of the multiplicity should be considered.
775 numberOfExistingReferences == count find mustInRelationcommit_reference_PullRequest(problem,interpretation,source,_);
776 numberOfExistingReferences != 1;
777 // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
778 // the upper bound of the opposite reference multiplicity should be considered.
779 numberOfExistingOppositeReferences == count find mustInRelationpullrequest_reference_Commit(problem,interpretation,target,_);
780 numberOfExistingOppositeReferences != 1;
781} or {
782 find mustInRelationcommit_reference_PullRequest(problem,interpretation,source,target);
783}
784/**
785 * Matcher for detecting tuples t where []user reference IssueEvent(source,target)
786 */
787private pattern mustInRelationuser_reference_IssueEvent(
788 problem:LogicProblem, interpretation:PartialInterpretation,
789 source: DefinedElement, target:DefinedElement)
790{
791 find interpretation(problem,interpretation);
792 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
793 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"user reference IssueEvent");
794 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
795 BinaryElementRelationLink.param1(link,source);
796 BinaryElementRelationLink.param2(link,target);
797}
798/**
799 * Matcher for detecting tuples t where <>user reference IssueEvent(source,target)
800 */
801private pattern mayInRelationuser_reference_IssueEvent(
802 problem:LogicProblem, interpretation:PartialInterpretation,
803 source: DefinedElement, target:DefinedElement)
804{
805 find interpretation(problem,interpretation);
806 // The two endpoint of the link have to exist
807 find mayExist(problem, interpretation, source);
808 find mayExist(problem, interpretation, target);
809 // Type consistency
810 find mayInstanceOfIssueEvent_class(problem,interpretation,source);
811 find mayInstanceOfUser_class(problem,interpretation,target);
812 // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
813 // the upper bound of the multiplicity should be considered.
814 numberOfExistingReferences == count find mustInRelationuser_reference_IssueEvent(problem,interpretation,source,_);
815 numberOfExistingReferences != 1;
816} or {
817 find mustInRelationuser_reference_IssueEvent(problem,interpretation,source,target);
818}
819/**
820 * Matcher for detecting tuples t where []action attribute IssueEvent(source,target)
821 */
822private pattern mustInRelationaction_attribute_IssueEvent(
823 problem:LogicProblem, interpretation:PartialInterpretation,
824 source: DefinedElement, target:DefinedElement)
825{
826 find interpretation(problem,interpretation);
827 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
828 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"action attribute IssueEvent");
829 PartialRelationInterpretation.relationlinks(relationIterpretation,link);
830 BinaryElementRelationLink.param1(link,source);
831 BinaryElementRelationLink.param2(link,target);
832}
833/**
834 * Matcher for detecting tuples t where <>action attribute IssueEvent(source,target)
835 */
836private pattern mayInRelationaction_attribute_IssueEvent(
837 problem:LogicProblem, interpretation:PartialInterpretation,
838 source: DefinedElement, target:DefinedElement)
839{
840 find interpretation(problem,interpretation);
841 // The two endpoint of the link have to exist
842 find mayExist(problem, interpretation, source);
843 find mayExist(problem, interpretation, target);
844 // Type consistency
845 find mayInstanceOfIssueEvent_class(problem,interpretation,source);
846 find mayInstanceOfAction_enum(problem,interpretation,target);
847 // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
848 // the upper bound of the multiplicity should be considered.
849 numberOfExistingReferences == count find mustInRelationaction_attribute_IssueEvent(problem,interpretation,source,_);
850 numberOfExistingReferences != 1;
851} or {
852 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,source,target);
853}
854
855//////////
856// 1.3 Relation Definition Indexers
857//////////
858// Must, May and Current queries for pattern queries directParent
859private pattern mustInRelation_pattern_queries_directParent(
860 problem:LogicProblem, interpretation:PartialInterpretation,
861 var_a, var_b)
862{
863 find interpretation(problem,interpretation);
864 // var_a exported
865 // var_b exported
866 find mustInRelationparents_reference_Commit(problem,interpretation,var_a,var_b);
867 find mustInstanceOfCommit_class(problem,interpretation,var_b);
868}
869private pattern mayInRelation_pattern_queries_directParent(
870 problem:LogicProblem, interpretation:PartialInterpretation,
871 var_a, var_b)
872{
873 find interpretation(problem,interpretation);
874 // var_a exported
875 // var_b exported
876 find mayInRelationparents_reference_Commit(problem,interpretation,var_a,var_b);
877 find mayInstanceOfCommit_class(problem,interpretation,var_b);
878}
879private pattern currentInRelation_pattern_queries_directParent(
880 problem:LogicProblem, interpretation:PartialInterpretation,
881 var_a, var_b)
882{
883 find interpretation(problem,interpretation);
884 // var_a exported
885 // var_b exported
886 find mustInRelationparents_reference_Commit(problem,interpretation,var_a,var_b);
887 find mustInstanceOfCommit_class(problem,interpretation,var_b);
888}
889private pattern twoParam_mustInRelation_pattern_queries_directParent(var_a, var_b) {
890 find mustInRelation_pattern_queries_directParent(_,_,var_a, var_b);
891}
892private pattern twoParam_mayInRelation_pattern_queries_directParent(var_a, var_b) {
893 find mayInRelation_pattern_queries_directParent(_,_,var_a, var_b);
894}
895private pattern twoParam_currentInRelation_pattern_queries_directParent(var_a, var_b) {
896 find currentInRelation_pattern_queries_directParent(_,_,var_a, var_b);
897}
898// Must, May and Current queries for pattern queries loopInParent
899private pattern mustInRelation_pattern_queries_loopInParent(
900 problem:LogicProblem, interpretation:PartialInterpretation,
901 var_a)
902{
903 find interpretation(problem,interpretation);
904 // var_a exported
905 find twoParam_mustInRelation_pattern_queries_directParent+(var_a,var_a);
906}
907private pattern mayInRelation_pattern_queries_loopInParent(
908 problem:LogicProblem, interpretation:PartialInterpretation,
909 var_a)
910{
911 find interpretation(problem,interpretation);
912 // var_a exported
913 find twoParam_mayInRelation_pattern_queries_directParent+(var_a,var_a);
914}
915private pattern currentInRelation_pattern_queries_loopInParent(
916 problem:LogicProblem, interpretation:PartialInterpretation,
917 var_a)
918{
919 find interpretation(problem,interpretation);
920 // var_a exported
921 find twoParam_currentInRelation_pattern_queries_directParent+(var_a,var_a);
922}
923// Must, May and Current queries for pattern queries checkAction
924private pattern mustInRelation_pattern_queries_checkAction(
925 problem:LogicProblem, interpretation:PartialInterpretation,
926 var_i, var_e, var_t)
927{
928 find interpretation(problem,interpretation);
929 // var_i exported
930 // var_e exported
931 // var_t exported
932 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
933 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_t);
934}
935private pattern mayInRelation_pattern_queries_checkAction(
936 problem:LogicProblem, interpretation:PartialInterpretation,
937 var_i, var_e, var_t)
938{
939 find interpretation(problem,interpretation);
940 // var_i exported
941 // var_e exported
942 // var_t exported
943 find mayInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
944 find mayInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_t);
945}
946private pattern currentInRelation_pattern_queries_checkAction(
947 problem:LogicProblem, interpretation:PartialInterpretation,
948 var_i, var_e, var_t)
949{
950 find interpretation(problem,interpretation);
951 // var_i exported
952 // var_e exported
953 // var_t exported
954 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
955 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_t);
956}
957// Must, May and Current queries for pattern queries checkUserAction
958private pattern mustInRelation_pattern_queries_checkUserAction(
959 problem:LogicProblem, interpretation:PartialInterpretation,
960 var_i, var_u, var_e, var_t)
961{
962 find interpretation(problem,interpretation);
963 // var_i exported
964 // var_u exported
965 // var_e exported
966 // var_t exported
967 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
968 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
969 find mustInstanceOfUser_class(problem,interpretation,var_u);
970 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_t);
971}
972private pattern mayInRelation_pattern_queries_checkUserAction(
973 problem:LogicProblem, interpretation:PartialInterpretation,
974 var_i, var_u, var_e, var_t)
975{
976 find interpretation(problem,interpretation);
977 // var_i exported
978 // var_u exported
979 // var_e exported
980 // var_t exported
981 find mayInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
982 find mayInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
983 find mayInstanceOfUser_class(problem,interpretation,var_u);
984 find mayInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_t);
985}
986private pattern currentInRelation_pattern_queries_checkUserAction(
987 problem:LogicProblem, interpretation:PartialInterpretation,
988 var_i, var_u, var_e, var_t)
989{
990 find interpretation(problem,interpretation);
991 // var_i exported
992 // var_u exported
993 // var_e exported
994 // var_t exported
995 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
996 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
997 find mustInstanceOfUser_class(problem,interpretation,var_u);
998 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_t);
999}
1000// Must, May and Current queries for pattern queries isReopen
1001private pattern mustInRelation_pattern_queries_isReopen(
1002 problem:LogicProblem, interpretation:PartialInterpretation,
1003 var_i, var_e)
1004{
1005 find interpretation(problem,interpretation);
1006 // var_i exported
1007 // var_e exported
1008 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1009 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1010 var_a == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1011}
1012private pattern mayInRelation_pattern_queries_isReopen(
1013 problem:LogicProblem, interpretation:PartialInterpretation,
1014 var_i, var_e)
1015{
1016 find interpretation(problem,interpretation);
1017 // var_i exported
1018 // var_e exported
1019 find mayInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1020 find mayInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1021 var_a == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1022}
1023private pattern currentInRelation_pattern_queries_isReopen(
1024 problem:LogicProblem, interpretation:PartialInterpretation,
1025 var_i, var_e)
1026{
1027 find interpretation(problem,interpretation);
1028 // var_i exported
1029 // var_e exported
1030 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1031 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1032 var_a == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1033}
1034// Must, May and Current queries for pattern queries isClose
1035private pattern mustInRelation_pattern_queries_isClose(
1036 problem:LogicProblem, interpretation:PartialInterpretation,
1037 var_i, var_e)
1038{
1039 find interpretation(problem,interpretation);
1040 // var_i exported
1041 // var_e exported
1042 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1043 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1044 var_a == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1045}
1046private pattern mayInRelation_pattern_queries_isClose(
1047 problem:LogicProblem, interpretation:PartialInterpretation,
1048 var_i, var_e)
1049{
1050 find interpretation(problem,interpretation);
1051 // var_i exported
1052 // var_e exported
1053 find mayInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1054 find mayInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1055 var_a == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1056}
1057private pattern currentInRelation_pattern_queries_isClose(
1058 problem:LogicProblem, interpretation:PartialInterpretation,
1059 var_i, var_e)
1060{
1061 find interpretation(problem,interpretation);
1062 // var_i exported
1063 // var_e exported
1064 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1065 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1066 var_a == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1067}
1068// Must, May and Current queries for pattern queries isUnSubscribe
1069private pattern mustInRelation_pattern_queries_isUnSubscribe(
1070 problem:LogicProblem, interpretation:PartialInterpretation,
1071 var_i, var_u, var_e)
1072{
1073 find interpretation(problem,interpretation);
1074 // var_i exported
1075 // var_u exported
1076 // var_e exported
1077 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1078 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1079 find mustInstanceOfUser_class(problem,interpretation,var_u);
1080 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1081 var_a == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1082}
1083private pattern mayInRelation_pattern_queries_isUnSubscribe(
1084 problem:LogicProblem, interpretation:PartialInterpretation,
1085 var_i, var_u, var_e)
1086{
1087 find interpretation(problem,interpretation);
1088 // var_i exported
1089 // var_u exported
1090 // var_e exported
1091 find mayInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1092 find mayInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1093 find mayInstanceOfUser_class(problem,interpretation,var_u);
1094 find mayInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1095 var_a == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1096}
1097private pattern currentInRelation_pattern_queries_isUnSubscribe(
1098 problem:LogicProblem, interpretation:PartialInterpretation,
1099 var_i, var_u, var_e)
1100{
1101 find interpretation(problem,interpretation);
1102 // var_i exported
1103 // var_u exported
1104 // var_e exported
1105 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1106 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1107 find mustInstanceOfUser_class(problem,interpretation,var_u);
1108 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1109 var_a == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1110}
1111// Must, May and Current queries for pattern queries isSubscribe
1112private pattern mustInRelation_pattern_queries_isSubscribe(
1113 problem:LogicProblem, interpretation:PartialInterpretation,
1114 var_i, var_u, var_e)
1115{
1116 find interpretation(problem,interpretation);
1117 // var_i exported
1118 // var_u exported
1119 // var_e exported
1120 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1121 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1122 find mustInstanceOfUser_class(problem,interpretation,var_u);
1123 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1124 var_a == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1125}
1126private pattern mayInRelation_pattern_queries_isSubscribe(
1127 problem:LogicProblem, interpretation:PartialInterpretation,
1128 var_i, var_u, var_e)
1129{
1130 find interpretation(problem,interpretation);
1131 // var_i exported
1132 // var_u exported
1133 // var_e exported
1134 find mayInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1135 find mayInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1136 find mayInstanceOfUser_class(problem,interpretation,var_u);
1137 find mayInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1138 var_a == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1139}
1140private pattern currentInRelation_pattern_queries_isSubscribe(
1141 problem:LogicProblem, interpretation:PartialInterpretation,
1142 var_i, var_u, var_e)
1143{
1144 find interpretation(problem,interpretation);
1145 // var_i exported
1146 // var_u exported
1147 // var_e exported
1148 find mustInRelationissueevent_reference_Issue(problem,interpretation,var_i,var_e);
1149 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1150 find mustInstanceOfUser_class(problem,interpretation,var_u);
1151 find mustInRelationaction_attribute_IssueEvent(problem,interpretation,var_e,var_a);
1152 var_a == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1153}
1154// Must, May and Current queries for pattern queries pullRequestOfIssue
1155private pattern mustInRelation_pattern_queries_pullRequestOfIssue(
1156 problem:LogicProblem, interpretation:PartialInterpretation,
1157 var_i, var_pr)
1158{
1159 find interpretation(problem,interpretation);
1160 // var_i exported
1161 // var_pr exported
1162 find mustInRelationpullrequest_reference_Issue(problem,interpretation,var_i,var_pr);
1163 find mustInstanceOfPullRequest_class(problem,interpretation,var_pr);
1164}
1165private pattern mayInRelation_pattern_queries_pullRequestOfIssue(
1166 problem:LogicProblem, interpretation:PartialInterpretation,
1167 var_i, var_pr)
1168{
1169 find interpretation(problem,interpretation);
1170 // var_i exported
1171 // var_pr exported
1172 find mayInRelationpullrequest_reference_Issue(problem,interpretation,var_i,var_pr);
1173 find mayInstanceOfPullRequest_class(problem,interpretation,var_pr);
1174}
1175private pattern currentInRelation_pattern_queries_pullRequestOfIssue(
1176 problem:LogicProblem, interpretation:PartialInterpretation,
1177 var_i, var_pr)
1178{
1179 find interpretation(problem,interpretation);
1180 // var_i exported
1181 // var_pr exported
1182 find mustInRelationpullrequest_reference_Issue(problem,interpretation,var_i,var_pr);
1183 find mustInstanceOfPullRequest_class(problem,interpretation,var_pr);
1184}
1185// Must, May and Current queries for pattern queries mergedIssueWithoutPr
1186private pattern mustInRelation_pattern_queries_mergedIssueWithoutPr(
1187 problem:LogicProblem, interpretation:PartialInterpretation,
1188 var_i)
1189{
1190 find interpretation(problem,interpretation);
1191 // var_i exported
1192 var_virtual0 == const_MERGED_Action;DefinedElement.name(const_MERGED_Action,"MERGED Action"); //LogicProblem.elements(problem,const_MERGED_Action);
1193 find mustInRelation_pattern_queries_checkAction(problem,interpretation,var_i,_var__0,var_virtual0);
1194 neg find mayInRelation_pattern_queries_pullRequestOfIssue(problem,interpretation,var_i,_var__1);
1195}
1196private pattern mayInRelation_pattern_queries_mergedIssueWithoutPr(
1197 problem:LogicProblem, interpretation:PartialInterpretation,
1198 var_i)
1199{
1200 find interpretation(problem,interpretation);
1201 // var_i exported
1202 var_virtual0 == const_MERGED_Action;DefinedElement.name(const_MERGED_Action,"MERGED Action"); //LogicProblem.elements(problem,const_MERGED_Action);
1203 find mayInRelation_pattern_queries_checkAction(problem,interpretation,var_i,_var__0,var_virtual0);
1204 neg find mustInRelation_pattern_queries_pullRequestOfIssue(problem,interpretation,var_i,_var__1);
1205}
1206private pattern currentInRelation_pattern_queries_mergedIssueWithoutPr(
1207 problem:LogicProblem, interpretation:PartialInterpretation,
1208 var_i)
1209{
1210 find interpretation(problem,interpretation);
1211 // var_i exported
1212 var_virtual0 == const_MERGED_Action;DefinedElement.name(const_MERGED_Action,"MERGED Action"); //LogicProblem.elements(problem,const_MERGED_Action);
1213 find currentInRelation_pattern_queries_checkAction(problem,interpretation,var_i,_var__0,var_virtual0);
1214 neg find currentInRelation_pattern_queries_pullRequestOfIssue(problem,interpretation,var_i,_var__1);
1215}
1216// Must, May and Current queries for pattern queries consecutiveClosesWithoutReopen
1217private pattern mustInRelation_pattern_queries_consecutiveClosesWithoutReopen(
1218 problem:LogicProblem, interpretation:PartialInterpretation,
1219 var_i)
1220{
1221 find interpretation(problem,interpretation);
1222 // var_i exported
1223 var_virtual0 == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1224 find mustInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a1,var_virtual0);
1225 var_virtual1 == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1226 find mustInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a2,var_virtual1);
1227 neg find mayEquivalent(problem, interpretation, var_a1, var_a2);
1228 neg find mayInRelation_pattern_queries_isReopen(problem,interpretation,var_i,_var__0);
1229}
1230private pattern mayInRelation_pattern_queries_consecutiveClosesWithoutReopen(
1231 problem:LogicProblem, interpretation:PartialInterpretation,
1232 var_i)
1233{
1234 find interpretation(problem,interpretation);
1235 // var_i exported
1236 var_virtual0 == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1237 find mayInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a1,var_virtual0);
1238 var_virtual1 == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1239 find mayInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a2,var_virtual1);
1240 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1241 neg find mustInRelation_pattern_queries_isReopen(problem,interpretation,var_i,_var__0);
1242}
1243private pattern currentInRelation_pattern_queries_consecutiveClosesWithoutReopen(
1244 problem:LogicProblem, interpretation:PartialInterpretation,
1245 var_i)
1246{
1247 find interpretation(problem,interpretation);
1248 // var_i exported
1249 var_virtual0 == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1250 find currentInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a1,var_virtual0);
1251 var_virtual1 == const_CLOSED_Action;DefinedElement.name(const_CLOSED_Action,"CLOSED Action"); //LogicProblem.elements(problem,const_CLOSED_Action);
1252 find currentInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a2,var_virtual1);
1253 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1254 neg find currentInRelation_pattern_queries_isReopen(problem,interpretation,var_i,_var__0);
1255}
1256// Must, May and Current queries for pattern queries consecutiveReopensWithoutClose
1257private pattern mustInRelation_pattern_queries_consecutiveReopensWithoutClose(
1258 problem:LogicProblem, interpretation:PartialInterpretation,
1259 var_i)
1260{
1261 find interpretation(problem,interpretation);
1262 // var_i exported
1263 var_virtual0 == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1264 find mustInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a1,var_virtual0);
1265 var_virtual1 == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1266 find mustInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a2,var_virtual1);
1267 neg find mayEquivalent(problem, interpretation, var_a1, var_a2);
1268 neg find mayInRelation_pattern_queries_isClose(problem,interpretation,var_i,_var__0);
1269}
1270private pattern mayInRelation_pattern_queries_consecutiveReopensWithoutClose(
1271 problem:LogicProblem, interpretation:PartialInterpretation,
1272 var_i)
1273{
1274 find interpretation(problem,interpretation);
1275 // var_i exported
1276 var_virtual0 == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1277 find mayInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a1,var_virtual0);
1278 var_virtual1 == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1279 find mayInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a2,var_virtual1);
1280 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1281 neg find mustInRelation_pattern_queries_isClose(problem,interpretation,var_i,_var__0);
1282}
1283private pattern currentInRelation_pattern_queries_consecutiveReopensWithoutClose(
1284 problem:LogicProblem, interpretation:PartialInterpretation,
1285 var_i)
1286{
1287 find interpretation(problem,interpretation);
1288 // var_i exported
1289 var_virtual0 == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1290 find currentInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a1,var_virtual0);
1291 var_virtual1 == const_REOPENED_Action;DefinedElement.name(const_REOPENED_Action,"REOPENED Action"); //LogicProblem.elements(problem,const_REOPENED_Action);
1292 find currentInRelation_pattern_queries_checkAction(problem,interpretation,var_i,var_a2,var_virtual1);
1293 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1294 neg find currentInRelation_pattern_queries_isClose(problem,interpretation,var_i,_var__0);
1295}
1296// Must, May and Current queries for pattern queries consecutiveSubWithoutUnSub
1297private pattern mustInRelation_pattern_queries_consecutiveSubWithoutUnSub(
1298 problem:LogicProblem, interpretation:PartialInterpretation,
1299 var_i, var_u)
1300{
1301 find interpretation(problem,interpretation);
1302 // var_i exported
1303 // var_u exported
1304 var_virtual0 == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1305 find mustInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a1,var_virtual0);
1306 var_virtual1 == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1307 find mustInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a2,var_virtual1);
1308 neg find mayEquivalent(problem, interpretation, var_a1, var_a2);
1309 neg find mayInRelation_pattern_queries_isUnSubscribe(problem,interpretation,var_i,var_u,_var__0);
1310}
1311private pattern mayInRelation_pattern_queries_consecutiveSubWithoutUnSub(
1312 problem:LogicProblem, interpretation:PartialInterpretation,
1313 var_i, var_u)
1314{
1315 find interpretation(problem,interpretation);
1316 // var_i exported
1317 // var_u exported
1318 var_virtual0 == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1319 find mayInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a1,var_virtual0);
1320 var_virtual1 == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1321 find mayInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a2,var_virtual1);
1322 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1323 neg find mustInRelation_pattern_queries_isUnSubscribe(problem,interpretation,var_i,var_u,_var__0);
1324}
1325private pattern currentInRelation_pattern_queries_consecutiveSubWithoutUnSub(
1326 problem:LogicProblem, interpretation:PartialInterpretation,
1327 var_i, var_u)
1328{
1329 find interpretation(problem,interpretation);
1330 // var_i exported
1331 // var_u exported
1332 var_virtual0 == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1333 find currentInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a1,var_virtual0);
1334 var_virtual1 == const_SUBSCRIBED_Action;DefinedElement.name(const_SUBSCRIBED_Action,"SUBSCRIBED Action"); //LogicProblem.elements(problem,const_SUBSCRIBED_Action);
1335 find currentInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a2,var_virtual1);
1336 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1337 neg find currentInRelation_pattern_queries_isUnSubscribe(problem,interpretation,var_i,var_u,_var__0);
1338}
1339// Must, May and Current queries for pattern queries consecutiveUnSubWithoutSub
1340private pattern mustInRelation_pattern_queries_consecutiveUnSubWithoutSub(
1341 problem:LogicProblem, interpretation:PartialInterpretation,
1342 var_i, var_u)
1343{
1344 find interpretation(problem,interpretation);
1345 // var_i exported
1346 // var_u exported
1347 var_virtual0 == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1348 find mustInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a1,var_virtual0);
1349 var_virtual1 == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1350 find mustInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a2,var_virtual1);
1351 neg find mayEquivalent(problem, interpretation, var_a1, var_a2);
1352 neg find mayInRelation_pattern_queries_isSubscribe(problem,interpretation,var_i,var_u,_var__0);
1353}
1354private pattern mayInRelation_pattern_queries_consecutiveUnSubWithoutSub(
1355 problem:LogicProblem, interpretation:PartialInterpretation,
1356 var_i, var_u)
1357{
1358 find interpretation(problem,interpretation);
1359 // var_i exported
1360 // var_u exported
1361 var_virtual0 == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1362 find mayInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a1,var_virtual0);
1363 var_virtual1 == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1364 find mayInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a2,var_virtual1);
1365 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1366 neg find mustInRelation_pattern_queries_isSubscribe(problem,interpretation,var_i,var_u,_var__0);
1367}
1368private pattern currentInRelation_pattern_queries_consecutiveUnSubWithoutSub(
1369 problem:LogicProblem, interpretation:PartialInterpretation,
1370 var_i, var_u)
1371{
1372 find interpretation(problem,interpretation);
1373 // var_i exported
1374 // var_u exported
1375 var_virtual0 == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1376 find currentInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a1,var_virtual0);
1377 var_virtual1 == const_UNSUBSCRIBED_Action;DefinedElement.name(const_UNSUBSCRIBED_Action,"UNSUBSCRIBED Action"); //LogicProblem.elements(problem,const_UNSUBSCRIBED_Action);
1378 find currentInRelation_pattern_queries_checkUserAction(problem,interpretation,var_i,var_u,var_a2,var_virtual1);
1379 neg find mustEquivalent(problem, interpretation, var_a1, var_a2);
1380 neg find currentInRelation_pattern_queries_isSubscribe(problem,interpretation,var_i,var_u,_var__0);
1381}
1382// Must, May and Current queries for pattern queries committer
1383private pattern mustInRelation_pattern_queries_committer(
1384 problem:LogicProblem, interpretation:PartialInterpretation,
1385 var_c, var_u)
1386{
1387 find interpretation(problem,interpretation);
1388 // var_c exported
1389 // var_u exported
1390 find mustInRelationcommitter_reference_Commit(problem,interpretation,var_c,var_u);
1391 find mustInstanceOfUser_class(problem,interpretation,var_u);
1392}
1393private pattern mayInRelation_pattern_queries_committer(
1394 problem:LogicProblem, interpretation:PartialInterpretation,
1395 var_c, var_u)
1396{
1397 find interpretation(problem,interpretation);
1398 // var_c exported
1399 // var_u exported
1400 find mayInRelationcommitter_reference_Commit(problem,interpretation,var_c,var_u);
1401 find mayInstanceOfUser_class(problem,interpretation,var_u);
1402}
1403private pattern currentInRelation_pattern_queries_committer(
1404 problem:LogicProblem, interpretation:PartialInterpretation,
1405 var_c, var_u)
1406{
1407 find interpretation(problem,interpretation);
1408 // var_c exported
1409 // var_u exported
1410 find mustInRelationcommitter_reference_Commit(problem,interpretation,var_c,var_u);
1411 find mustInstanceOfUser_class(problem,interpretation,var_u);
1412}
1413// Must, May and Current queries for pattern queries eventUser
1414private pattern mustInRelation_pattern_queries_eventUser(
1415 problem:LogicProblem, interpretation:PartialInterpretation,
1416 var_e, var_u)
1417{
1418 find interpretation(problem,interpretation);
1419 // var_e exported
1420 // var_u exported
1421 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1422 find mustInstanceOfUser_class(problem,interpretation,var_u);
1423}
1424private pattern mayInRelation_pattern_queries_eventUser(
1425 problem:LogicProblem, interpretation:PartialInterpretation,
1426 var_e, var_u)
1427{
1428 find interpretation(problem,interpretation);
1429 // var_e exported
1430 // var_u exported
1431 find mayInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1432 find mayInstanceOfUser_class(problem,interpretation,var_u);
1433}
1434private pattern currentInRelation_pattern_queries_eventUser(
1435 problem:LogicProblem, interpretation:PartialInterpretation,
1436 var_e, var_u)
1437{
1438 find interpretation(problem,interpretation);
1439 // var_e exported
1440 // var_u exported
1441 find mustInRelationuser_reference_IssueEvent(problem,interpretation,var_e,var_u);
1442 find mustInstanceOfUser_class(problem,interpretation,var_u);
1443}
1444// Must, May and Current queries for pattern queries noCommitter
1445private pattern mustInRelation_pattern_queries_noCommitter(
1446 problem:LogicProblem, interpretation:PartialInterpretation,
1447 var_c)
1448{
1449 find interpretation(problem,interpretation);
1450 // var_c exported
1451 find mustInstanceOfCommit_class(problem,interpretation,var_c);
1452 neg find mayInRelation_pattern_queries_committer(problem,interpretation,var_c,_var__0);
1453}
1454private pattern mayInRelation_pattern_queries_noCommitter(
1455 problem:LogicProblem, interpretation:PartialInterpretation,
1456 var_c)
1457{
1458 find interpretation(problem,interpretation);
1459 // var_c exported
1460 find mayInstanceOfCommit_class(problem,interpretation,var_c);
1461 neg find mustInRelation_pattern_queries_committer(problem,interpretation,var_c,_var__0);
1462}
1463private pattern currentInRelation_pattern_queries_noCommitter(
1464 problem:LogicProblem, interpretation:PartialInterpretation,
1465 var_c)
1466{
1467 find interpretation(problem,interpretation);
1468 // var_c exported
1469 find mustInstanceOfCommit_class(problem,interpretation,var_c);
1470 neg find currentInRelation_pattern_queries_committer(problem,interpretation,var_c,_var__0);
1471}
1472// Must, May and Current queries for pattern queries noUser
1473private pattern mustInRelation_pattern_queries_noUser(
1474 problem:LogicProblem, interpretation:PartialInterpretation,
1475 var_e)
1476{
1477 find interpretation(problem,interpretation);
1478 // var_e exported
1479 find mustInstanceOfIssueEvent_class(problem,interpretation,var_e);
1480 neg find mayInRelation_pattern_queries_eventUser(problem,interpretation,var_e,_var__0);
1481}
1482private pattern mayInRelation_pattern_queries_noUser(
1483 problem:LogicProblem, interpretation:PartialInterpretation,
1484 var_e)
1485{
1486 find interpretation(problem,interpretation);
1487 // var_e exported
1488 find mayInstanceOfIssueEvent_class(problem,interpretation,var_e);
1489 neg find mustInRelation_pattern_queries_eventUser(problem,interpretation,var_e,_var__0);
1490}
1491private pattern currentInRelation_pattern_queries_noUser(
1492 problem:LogicProblem, interpretation:PartialInterpretation,
1493 var_e)
1494{
1495 find interpretation(problem,interpretation);
1496 // var_e exported
1497 find mustInstanceOfIssueEvent_class(problem,interpretation,var_e);
1498 neg find currentInRelation_pattern_queries_eventUser(problem,interpretation,var_e,_var__0);
1499}
1500
1501//////////
1502// 1.4 Containment Indexer
1503//////////
1504private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
1505 find mustContains4(_,_,source,target);
1506}
1507
1508private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
1509 source: DefinedElement, target: DefinedElement)
1510 { find mustInRelationissue_reference_Project(problem,interpretation,source,target); }or
1511
1512 { find mustInRelationprojectMembers_reference_Project(problem,interpretation,source,target); }or
1513
1514 { find mustInRelationcommits_reference_Project(problem,interpretation,source,target); }or
1515
1516 { find mustInRelationpullrequest_reference_Issue(problem,interpretation,source,target); }or
1517
1518 { find mustInRelationissueevent_reference_Issue(problem,interpretation,source,target); }
1519
1520private pattern mustTransitiveContains(source,target) {
1521 find mustContains2+(source,target);
1522}
1523
1524//////////
1525// 2. Invalidation Indexers
1526//////////
1527// 2.1 Invalidated by WF Queries
1528//////////
1529pattern invalidatedBy_pattern_queries_loopInParent(problem:LogicProblem, interpretation:PartialInterpretation,
1530 var_a)
1531{
1532 find mustInRelation_pattern_queries_loopInParent(problem,interpretation,var_a);
1533}
1534pattern invalidatedBy_pattern_queries_mergedIssueWithoutPr(problem:LogicProblem, interpretation:PartialInterpretation,
1535 var_i)
1536{
1537 find mustInRelation_pattern_queries_mergedIssueWithoutPr(problem,interpretation,var_i);
1538}
1539pattern invalidatedBy_pattern_queries_consecutiveClosesWithoutReopen(problem:LogicProblem, interpretation:PartialInterpretation,
1540 var_i)
1541{
1542 find mustInRelation_pattern_queries_consecutiveClosesWithoutReopen(problem,interpretation,var_i);
1543}
1544pattern invalidatedBy_pattern_queries_consecutiveReopensWithoutClose(problem:LogicProblem, interpretation:PartialInterpretation,
1545 var_i)
1546{
1547 find mustInRelation_pattern_queries_consecutiveReopensWithoutClose(problem,interpretation,var_i);
1548}
1549pattern invalidatedBy_pattern_queries_consecutiveSubWithoutUnSub(problem:LogicProblem, interpretation:PartialInterpretation,
1550 var_i, var_u)
1551{
1552 find mustInRelation_pattern_queries_consecutiveSubWithoutUnSub(problem,interpretation,var_i,var_u);
1553}
1554pattern invalidatedBy_pattern_queries_consecutiveUnSubWithoutSub(problem:LogicProblem, interpretation:PartialInterpretation,
1555 var_i, var_u)
1556{
1557 find mustInRelation_pattern_queries_consecutiveUnSubWithoutSub(problem,interpretation,var_i,var_u);
1558}
1559pattern invalidatedBy_pattern_queries_noCommitter(problem:LogicProblem, interpretation:PartialInterpretation,
1560 var_c)
1561{
1562 find mustInRelation_pattern_queries_noCommitter(problem,interpretation,var_c);
1563}
1564pattern invalidatedBy_pattern_queries_noUser(problem:LogicProblem, interpretation:PartialInterpretation,
1565 var_e)
1566{
1567 find mustInRelation_pattern_queries_noUser(problem,interpretation,var_e);
1568}
1569
1570//////////
1571// 3. Unfinishedness Indexers
1572//////////
1573// 3.1 Unfinishedness Measured by Multiplicity
1574//////////
1575
1576
1577
1578
1579
1580
1581private pattern existingMultiplicity_committer_reference_Commit(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement, numberOfExistingReferences:java Integer) {
1582 find interpretation(problem,interpretation);
1583 find mustExist(problem,interpretation,object);
1584 find mustInstanceOfCommit_class(problem,interpretation,object);
1585 numberOfExistingReferences == count find mustInRelationcommitter_reference_Commit(problem,interpretation,object,_);
1586}
1587
1588
1589
1590
1591
1592
1593private pattern existingMultiplicity_user_reference_IssueEvent(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement, numberOfExistingReferences:java Integer) {
1594 find interpretation(problem,interpretation);
1595 find mustExist(problem,interpretation,object);
1596 find mustInstanceOfIssueEvent_class(problem,interpretation,object);
1597 numberOfExistingReferences == count find mustInRelationuser_reference_IssueEvent(problem,interpretation,object,_);
1598}
1599
1600
1601
1602//////////
1603// 3.2 Unfinishedness Measured by WF Queries
1604//////////
1605pattern unfinishedBy_pattern_queries_loopInParent(problem:LogicProblem, interpretation:PartialInterpretation,
1606 var_a)
1607{
1608 find currentInRelation_pattern_queries_loopInParent(problem,interpretation,var_a);
1609}
1610pattern unfinishedBy_pattern_queries_mergedIssueWithoutPr(problem:LogicProblem, interpretation:PartialInterpretation,
1611 var_i)
1612{
1613 find currentInRelation_pattern_queries_mergedIssueWithoutPr(problem,interpretation,var_i);
1614}
1615pattern unfinishedBy_pattern_queries_consecutiveClosesWithoutReopen(problem:LogicProblem, interpretation:PartialInterpretation,
1616 var_i)
1617{
1618 find currentInRelation_pattern_queries_consecutiveClosesWithoutReopen(problem,interpretation,var_i);
1619}
1620pattern unfinishedBy_pattern_queries_consecutiveReopensWithoutClose(problem:LogicProblem, interpretation:PartialInterpretation,
1621 var_i)
1622{
1623 find currentInRelation_pattern_queries_consecutiveReopensWithoutClose(problem,interpretation,var_i);
1624}
1625pattern unfinishedBy_pattern_queries_consecutiveSubWithoutUnSub(problem:LogicProblem, interpretation:PartialInterpretation,
1626 var_i, var_u)
1627{
1628 find currentInRelation_pattern_queries_consecutiveSubWithoutUnSub(problem,interpretation,var_i,var_u);
1629}
1630pattern unfinishedBy_pattern_queries_consecutiveUnSubWithoutSub(problem:LogicProblem, interpretation:PartialInterpretation,
1631 var_i, var_u)
1632{
1633 find currentInRelation_pattern_queries_consecutiveUnSubWithoutSub(problem,interpretation,var_i,var_u);
1634}
1635pattern unfinishedBy_pattern_queries_noCommitter(problem:LogicProblem, interpretation:PartialInterpretation,
1636 var_c)
1637{
1638 find currentInRelation_pattern_queries_noCommitter(problem,interpretation,var_c);
1639}
1640pattern unfinishedBy_pattern_queries_noUser(problem:LogicProblem, interpretation:PartialInterpretation,
1641 var_e)
1642{
1643 find currentInRelation_pattern_queries_noUser(problem,interpretation,var_e);
1644}
1645
1646//////////
1647// 4. Refinement Indexers
1648//////////
1649// 4.1 Object constructors
1650//////////
1651pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
1652{
1653 find interpretation(problem,interpretation);
1654 find mustInstanceOfUser_class(problem,interpretation,root);
1655 find mustExist(problem, interpretation, root);
1656}or{
1657 find interpretation(problem,interpretation);
1658 find mustInstanceOfProject_class(problem,interpretation,root);
1659 find mustExist(problem, interpretation, root);
1660}or{
1661 find interpretation(problem,interpretation);
1662 find mustInstanceOfIssueEvent_class(problem,interpretation,root);
1663 find mustExist(problem, interpretation, root);
1664}or{
1665 find interpretation(problem,interpretation);
1666 find mustInstanceOfCommit_class(problem,interpretation,root);
1667 find mustExist(problem, interpretation, root);
1668}or{
1669 find interpretation(problem,interpretation);
1670 find mustInstanceOfPullRequest_class(problem,interpretation,root);
1671 find mustExist(problem, interpretation, root);
1672}or{
1673 find interpretation(problem,interpretation);
1674 find mustInstanceOfIssue_class(problem,interpretation,root);
1675 find mustExist(problem, interpretation, root);
1676}or{
1677 find interpretation(problem,interpretation);
1678 find mustInstanceOfProject_class_DefinedPart(problem,interpretation,root);
1679 find mustExist(problem, interpretation, root);
1680}or{
1681 find interpretation(problem,interpretation);
1682 find mustInstanceOfProject_class_UndefinedPart(problem,interpretation,root);
1683 find mustExist(problem, interpretation, root);
1684}
1685pattern createObject_IssueEvent_class_by_issueevent_reference_Issue(
1686 problem:LogicProblem, interpretation:PartialInterpretation,
1687 relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
1688 container:DefinedElement)
1689{
1690 find interpretation(problem,interpretation);
1691 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1692 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"IssueEvent class");
1693 PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
1694 PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"issueevent reference Issue");
1695 find mustInstanceOfIssue_class(problem,interpretation,container);
1696 find mayInstanceOfIssueEvent_class(problem,interpretation,newObject);
1697 find mayInRelationissueevent_reference_Issue(problem,interpretation,container,newObject);
1698 find mustExist(problem, interpretation, container);
1699 neg find mustExist(problem, interpretation, newObject);
1700}
1701pattern createObject_IssueEvent_class(
1702 problem:LogicProblem, interpretation:PartialInterpretation,
1703 typeInterpretation:PartialComplexTypeInterpretation)
1704{
1705 find interpretation(problem,interpretation);
1706 neg find hasElementInContainment(problem,interpretation);
1707 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1708 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"IssueEvent class");
1709 find mayInstanceOfIssueEvent_class(problem,interpretation,newObject);
1710 find mayExist(problem, interpretation, newObject);
1711 neg find mustExist(problem, interpretation, newObject);
1712}
1713pattern createObject_PullRequest_class_by_pullrequest_reference_Issue(
1714 problem:LogicProblem, interpretation:PartialInterpretation,
1715 relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
1716 container:DefinedElement)
1717{
1718 find interpretation(problem,interpretation);
1719 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1720 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"PullRequest class");
1721 PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
1722 PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"pullrequest reference Issue");
1723 find mustInstanceOfIssue_class(problem,interpretation,container);
1724 find mayInstanceOfPullRequest_class(problem,interpretation,newObject);
1725 find mayInRelationpullrequest_reference_Issue(problem,interpretation,container,newObject);
1726 find mustExist(problem, interpretation, container);
1727 neg find mustExist(problem, interpretation, newObject);
1728}
1729pattern createObject_PullRequest_class(
1730 problem:LogicProblem, interpretation:PartialInterpretation,
1731 typeInterpretation:PartialComplexTypeInterpretation)
1732{
1733 find interpretation(problem,interpretation);
1734 neg find hasElementInContainment(problem,interpretation);
1735 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1736 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"PullRequest class");
1737 find mayInstanceOfPullRequest_class(problem,interpretation,newObject);
1738 find mayExist(problem, interpretation, newObject);
1739 neg find mustExist(problem, interpretation, newObject);
1740}
1741pattern createObject_Project_class_UndefinedPart(
1742 problem:LogicProblem, interpretation:PartialInterpretation,
1743 typeInterpretation:PartialComplexTypeInterpretation)
1744{
1745 find interpretation(problem,interpretation);
1746 neg find hasElementInContainment(problem,interpretation);
1747 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1748 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Project class UndefinedPart");
1749 find mayInstanceOfProject_class_UndefinedPart(problem,interpretation,newObject);
1750 find mayExist(problem, interpretation, newObject);
1751 neg find mustExist(problem, interpretation, newObject);
1752}
1753pattern createObject_Commit_class_by_commits_reference_Project(
1754 problem:LogicProblem, interpretation:PartialInterpretation,
1755 relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
1756 container:DefinedElement)
1757{
1758 find interpretation(problem,interpretation);
1759 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1760 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Commit class");
1761 PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
1762 PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"commits reference Project");
1763 find mustInstanceOfProject_class(problem,interpretation,container);
1764 find mayInstanceOfCommit_class(problem,interpretation,newObject);
1765 find mayInRelationcommits_reference_Project(problem,interpretation,container,newObject);
1766 find mustExist(problem, interpretation, container);
1767 neg find mustExist(problem, interpretation, newObject);
1768}
1769pattern createObject_Commit_class(
1770 problem:LogicProblem, interpretation:PartialInterpretation,
1771 typeInterpretation:PartialComplexTypeInterpretation)
1772{
1773 find interpretation(problem,interpretation);
1774 neg find hasElementInContainment(problem,interpretation);
1775 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1776 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Commit class");
1777 find mayInstanceOfCommit_class(problem,interpretation,newObject);
1778 find mayExist(problem, interpretation, newObject);
1779 neg find mustExist(problem, interpretation, newObject);
1780}
1781pattern createObject_User_class_by_projectMembers_reference_Project(
1782 problem:LogicProblem, interpretation:PartialInterpretation,
1783 relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
1784 container:DefinedElement)
1785{
1786 find interpretation(problem,interpretation);
1787 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1788 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"User class");
1789 PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
1790 PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"projectMembers reference Project");
1791 find mustInstanceOfProject_class(problem,interpretation,container);
1792 find mayInstanceOfUser_class(problem,interpretation,newObject);
1793 find mayInRelationprojectMembers_reference_Project(problem,interpretation,container,newObject);
1794 find mustExist(problem, interpretation, container);
1795 neg find mustExist(problem, interpretation, newObject);
1796}
1797pattern createObject_User_class(
1798 problem:LogicProblem, interpretation:PartialInterpretation,
1799 typeInterpretation:PartialComplexTypeInterpretation)
1800{
1801 find interpretation(problem,interpretation);
1802 neg find hasElementInContainment(problem,interpretation);
1803 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1804 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"User class");
1805 find mayInstanceOfUser_class(problem,interpretation,newObject);
1806 find mayExist(problem, interpretation, newObject);
1807 neg find mustExist(problem, interpretation, newObject);
1808}
1809pattern createObject_Issue_class_by_issue_reference_Project(
1810 problem:LogicProblem, interpretation:PartialInterpretation,
1811 relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
1812 container:DefinedElement)
1813{
1814 find interpretation(problem,interpretation);
1815 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1816 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Issue class");
1817 PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
1818 PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"issue reference Project");
1819 find mustInstanceOfProject_class(problem,interpretation,container);
1820 find mayInstanceOfIssue_class(problem,interpretation,newObject);
1821 find mayInRelationissue_reference_Project(problem,interpretation,container,newObject);
1822 find mustExist(problem, interpretation, container);
1823 neg find mustExist(problem, interpretation, newObject);
1824}
1825pattern createObject_Issue_class(
1826 problem:LogicProblem, interpretation:PartialInterpretation,
1827 typeInterpretation:PartialComplexTypeInterpretation)
1828{
1829 find interpretation(problem,interpretation);
1830 neg find hasElementInContainment(problem,interpretation);
1831 PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
1832 PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Issue class");
1833 find mayInstanceOfIssue_class(problem,interpretation,newObject);
1834 find mayExist(problem, interpretation, newObject);
1835 neg find mustExist(problem, interpretation, newObject);
1836}
1837
1838//////////
1839// 4.2 Type refinement
1840//////////
1841pattern refineTypeTo_IssueEvent_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
1842 find interpretation(problem,interpretation);
1843 PartialInterpretation.newElements(interpretation,element);
1844 find mayInstanceOfIssueEvent_class(problem,interpretation,element);
1845 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
1846 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
1847 neg find mustInstanceOfProject_class(problem,interpretation,element);
1848 neg find mustInstanceOfCommit_class(problem,interpretation,element);
1849 neg find mustInstanceOfIssue_class(problem,interpretation,element);
1850 neg find mustInstanceOfUser_class(problem,interpretation,element);
1851}
1852pattern refineTypeTo_PullRequest_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
1853 find interpretation(problem,interpretation);
1854 PartialInterpretation.newElements(interpretation,element);
1855 find mayInstanceOfPullRequest_class(problem,interpretation,element);
1856 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
1857 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
1858 neg find mustInstanceOfProject_class(problem,interpretation,element);
1859 neg find mustInstanceOfCommit_class(problem,interpretation,element);
1860 neg find mustInstanceOfIssue_class(problem,interpretation,element);
1861 neg find mustInstanceOfUser_class(problem,interpretation,element);
1862}
1863pattern refineTypeTo_Project_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
1864 find interpretation(problem,interpretation);
1865 PartialInterpretation.newElements(interpretation,element);
1866 find mayInstanceOfProject_class_UndefinedPart(problem,interpretation,element);
1867 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
1868 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
1869 neg find mustInstanceOfProject_class_UndefinedPart(problem,interpretation,element);
1870 neg find mustInstanceOfCommit_class(problem,interpretation,element);
1871 neg find mustInstanceOfIssue_class(problem,interpretation,element);
1872 neg find mustInstanceOfUser_class(problem,interpretation,element);
1873}
1874pattern refineTypeTo_Commit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
1875 find interpretation(problem,interpretation);
1876 PartialInterpretation.newElements(interpretation,element);
1877 find mayInstanceOfCommit_class(problem,interpretation,element);
1878 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
1879 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
1880 neg find mustInstanceOfProject_class(problem,interpretation,element);
1881 neg find mustInstanceOfCommit_class(problem,interpretation,element);
1882 neg find mustInstanceOfUser_class(problem,interpretation,element);
1883 neg find mustInstanceOfIssue_class(problem,interpretation,element);
1884}
1885pattern refineTypeTo_User_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
1886 find interpretation(problem,interpretation);
1887 PartialInterpretation.newElements(interpretation,element);
1888 find mayInstanceOfUser_class(problem,interpretation,element);
1889 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
1890 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
1891 neg find mustInstanceOfProject_class(problem,interpretation,element);
1892 neg find mustInstanceOfCommit_class(problem,interpretation,element);
1893 neg find mustInstanceOfIssue_class(problem,interpretation,element);
1894 neg find mustInstanceOfUser_class(problem,interpretation,element);
1895}
1896pattern refineTypeTo_Issue_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
1897 find interpretation(problem,interpretation);
1898 PartialInterpretation.newElements(interpretation,element);
1899 find mayInstanceOfIssue_class(problem,interpretation,element);
1900 neg find mustInstanceOfIssueEvent_class(problem,interpretation,element);
1901 neg find mustInstanceOfPullRequest_class(problem,interpretation,element);
1902 neg find mustInstanceOfProject_class(problem,interpretation,element);
1903 neg find mustInstanceOfCommit_class(problem,interpretation,element);
1904 neg find mustInstanceOfIssue_class(problem,interpretation,element);
1905 neg find mustInstanceOfUser_class(problem,interpretation,element);
1906}
1907
1908//////////
1909// 4.3 Relation refinement
1910//////////
1911pattern refineRelation_committer_reference_Commit(
1912 problem:LogicProblem, interpretation:PartialInterpretation,
1913 relationIterpretation:PartialRelationInterpretation,
1914 from: DefinedElement, to: DefinedElement)
1915{
1916 find interpretation(problem,interpretation);
1917 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
1918 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"committer reference Commit");
1919 find mustExist(problem, interpretation, from);
1920 find mustExist(problem, interpretation, to);
1921 find mustInstanceOfCommit_class(problem,interpretation,from);
1922 find mustInstanceOfUser_class(problem,interpretation,to);
1923 find mayInRelationcommitter_reference_Commit(problem,interpretation,from,to);
1924 neg find mustInRelationcommitter_reference_Commit(problem,interpretation,from,to);
1925}
1926
1927pattern refineRelation_parents_reference_Commit(
1928 problem:LogicProblem, interpretation:PartialInterpretation,
1929 relationIterpretation:PartialRelationInterpretation,
1930 from: DefinedElement, to: DefinedElement)
1931{
1932 find interpretation(problem,interpretation);
1933 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
1934 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parents reference Commit");
1935 find mustExist(problem, interpretation, from);
1936 find mustExist(problem, interpretation, to);
1937 find mustInstanceOfCommit_class(problem,interpretation,from);
1938 find mustInstanceOfCommit_class(problem,interpretation,to);
1939 find mayInRelationparents_reference_Commit(problem,interpretation,from,to);
1940 neg find mustInRelationparents_reference_Commit(problem,interpretation,from,to);
1941}
1942
1943pattern refineRelation_commit_reference_PullRequest_and_pullrequest_reference_Commit(
1944 problem:LogicProblem, interpretation:PartialInterpretation,
1945 relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
1946 from: DefinedElement, to: DefinedElement)
1947{
1948 find interpretation(problem,interpretation);
1949 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
1950 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"commit reference PullRequest");
1951 PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
1952 PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"pullrequest reference Commit");
1953 find mustExist(problem, interpretation, from);
1954 find mustExist(problem, interpretation, to);
1955 find mustInstanceOfPullRequest_class(problem,interpretation,from);
1956 find mustInstanceOfCommit_class(problem,interpretation,to);
1957 find mayInRelationcommit_reference_PullRequest(problem,interpretation,from,to);
1958 neg find mustInRelationcommit_reference_PullRequest(problem,interpretation,from,to);
1959}
1960
1961pattern refineRelation_user_reference_IssueEvent(
1962 problem:LogicProblem, interpretation:PartialInterpretation,
1963 relationIterpretation:PartialRelationInterpretation,
1964 from: DefinedElement, to: DefinedElement)
1965{
1966 find interpretation(problem,interpretation);
1967 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
1968 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"user reference IssueEvent");
1969 find mustExist(problem, interpretation, from);
1970 find mustExist(problem, interpretation, to);
1971 find mustInstanceOfIssueEvent_class(problem,interpretation,from);
1972 find mustInstanceOfUser_class(problem,interpretation,to);
1973 find mayInRelationuser_reference_IssueEvent(problem,interpretation,from,to);
1974 neg find mustInRelationuser_reference_IssueEvent(problem,interpretation,from,to);
1975}
1976
1977pattern refineRelation_action_attribute_IssueEvent(
1978 problem:LogicProblem, interpretation:PartialInterpretation,
1979 relationIterpretation:PartialRelationInterpretation,
1980 from: DefinedElement, to: DefinedElement)
1981{
1982 find interpretation(problem,interpretation);
1983 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
1984 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"action attribute IssueEvent");
1985 find mustExist(problem, interpretation, from);
1986 find mustExist(problem, interpretation, to);
1987 find mustInstanceOfIssueEvent_class(problem,interpretation,from);
1988 find mustInstanceOfAction_enum(problem,interpretation,to);
1989 find mayInRelationaction_attribute_IssueEvent(problem,interpretation,from,to);
1990 neg find mustInRelationaction_attribute_IssueEvent(problem,interpretation,from,to);
1991}
1992
1993
1994//////////
1995// 5 Hints
1996//////////
1997
1998//////////
1999// 6 Unit Propagations
2000//////////
2001
2002// Collected propagation preconditions:
2003
2004