aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2020-08-28 18:58:37 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2020-08-28 18:58:37 +0200
commit4fe7fce97aedbd516109ef81afc33e00112b7b68 (patch)
tree7eaa7c4e9b31b2a1488e49de48721b4dbad31fae
parentMoDeS3 unit propagation WIP (diff)
downloadVIATRA-Generator-4fe7fce97aedbd516109ef81afc33e00112b7b68.tar.gz
VIATRA-Generator-4fe7fce97aedbd516109ef81afc33e00112b7b68.tar.zst
VIATRA-Generator-4fe7fce97aedbd516109ef81afc33e00112b7b68.zip
Must unit propagation
-rw-r--r--Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbinbin1700 -> 1700 bytes
-rw-r--r--Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbinbin2525 -> 2525 bytes
-rw-r--r--Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbinbin5333 -> 5333 bytes
-rw-r--r--Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbinbin4902 -> 4902 bytes
-rw-r--r--Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbinbin1716 -> 1716 bytes
-rw-r--r--Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbinbin2741 -> 2741 bytes
-rw-r--r--Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbinbin2757 -> 2757 bytes
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/.gitignore1
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF5
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java9
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java4
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java76
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/SimpleSegment.java17
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java11
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java10
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java24
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/SimpleSegmentImpl.java37
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java18
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java22
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.aird_deactivated1531
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.ecore3
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.genmodel1
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/output/solution.partialinterpretation1068
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.gml1191
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.partialinterpretation1037
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.pngbin105065 -> 0 bytes
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml8
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql54
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend30
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3TypeScopeHint.xtend79
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3UnitPropagationGenerator.xtend470
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore7
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/ExtraInputOfTurnout.java730
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/InputsOfTurnout.java (renamed from Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TurnoutInSegments.java)156
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java72
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooFewInputsOfTurnout.java (renamed from Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/NoExtraInputOfTurnout.java)119
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java64
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfTurnout.java (renamed from Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyExtraInputsOfTurnout.java)156
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Turnout.java543
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbinbin14631 -> 15038 bytes
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbinbin0 -> 7179 bytes
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbinbin9899 -> 11735 bytes
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore1
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java56
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3TypeScopeHint.java133
-rw-r--r--Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3UnitPropagationGenerator.java1025
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml68
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend14
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend14
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend11
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend137
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend338
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java4
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend4
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend4
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend4
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend6
61 files changed, 2357 insertions, 7029 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
index 1e457bb2..e697e27d 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
+++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
Binary files differ
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
index 6ad24fc0..ddbe1979 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
+++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
Binary files differ
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin
index 18c9aee3..e1e21292 100644
--- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin
+++ b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin
Binary files differ
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin
index 0ebd4493..b967ea7c 100644
--- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin
+++ b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin
Binary files differ
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin
index bb484ba1..2c271c98 100644
--- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin
+++ b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin
Binary files differ
diff --git a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin
index 61448536..40f87b4c 100644
--- a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin
+++ b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin
Binary files differ
diff --git a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin
index 9af9309d..d0715440 100644
--- a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin
+++ b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin
Binary files differ
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/.gitignore b/Domains/ca.mcgill.rtgmrt.example.modes3/.gitignore
index ae3c1726..6cef8ea6 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/.gitignore
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/.gitignore
@@ -1 +1,2 @@
1/bin/ 1/bin/
2output/
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF b/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF
index 53e4a39c..96bd2113 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF
@@ -3,6 +3,7 @@ Bundle-ManifestVersion: 2
3Bundle-Name: %pluginName 3Bundle-Name: %pluginName
4Bundle-SymbolicName: ca.mcgill.rtgmrt.example.modes3;singleton:=true 4Bundle-SymbolicName: ca.mcgill.rtgmrt.example.modes3;singleton:=true
5Bundle-Version: 0.1.0.qualifier 5Bundle-Version: 0.1.0.qualifier
6Bundle-ClassPath: .
6Bundle-Vendor: %providerName 7Bundle-Vendor: %providerName
7Bundle-Localization: plugin 8Bundle-Localization: plugin
8Export-Package: modes3, 9Export-Package: modes3,
@@ -28,7 +29,7 @@ Require-Bundle: org.eclipse.viatra.query.runtime,
28 org.eclipse.emf.ecore.xmi;bundle-version="2.16.0", 29 org.eclipse.emf.ecore.xmi;bundle-version="2.16.0",
29 hu.bme.mit.inf.dslreasoner.visualisation;bundle-version="1.0.0", 30 hu.bme.mit.inf.dslreasoner.visualisation;bundle-version="1.0.0",
30 org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.4.0" 31 org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.4.0"
31Bundle-RequiredExecutionEnvironment: J2SE-1.5
32Bundle-ActivationPolicy: lazy
33Import-Package: org.apache.log4j 32Import-Package: org.apache.log4j
34Automatic-Module-Name: ca.mcgill.rtgmrt.example.modes3 33Automatic-Module-Name: ca.mcgill.rtgmrt.example.modes3
34Bundle-ActivationPolicy: lazy
35Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java
index 73188db1..10ce47a1 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java
@@ -58,6 +58,15 @@ public interface Modes3Factory extends EFactory {
58 Train createTrain(); 58 Train createTrain();
59 59
60 /** 60 /**
61 * Returns a new object of class '<em>Simple Segment</em>'.
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @return a new object of class '<em>Simple Segment</em>'.
65 * @generated
66 */
67 SimpleSegment createSimpleSegment();
68
69 /**
61 * Returns the package supported by this factory. 70 * Returns the package supported by this factory.
62 * <!-- begin-user-doc --> 71 * <!-- begin-user-doc -->
63 * <!-- end-user-doc --> 72 * <!-- end-user-doc -->
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java
index 4f925b7a..d46ee305 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java
@@ -62,7 +62,7 @@ public interface Modes3ModelRoot extends EObject {
62 62
63 /** 63 /**
64 * Returns the value of the '<em><b>Segments</b></em>' containment reference list. 64 * Returns the value of the '<em><b>Segments</b></em>' containment reference list.
65 * The list contents are of type {@link modes3.Segment}. 65 * The list contents are of type {@link modes3.SimpleSegment}.
66 * <!-- begin-user-doc --> 66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc --> 67 * <!-- end-user-doc -->
68 * @return the value of the '<em>Segments</em>' containment reference list. 68 * @return the value of the '<em>Segments</em>' containment reference list.
@@ -70,7 +70,7 @@ public interface Modes3ModelRoot extends EObject {
70 * @model containment="true" 70 * @model containment="true"
71 * @generated 71 * @generated
72 */ 72 */
73 EList<Segment> getSegments(); 73 EList<SimpleSegment> getSegments();
74 74
75 /** 75 /**
76 * Returns the value of the '<em><b>Turnouts</b></em>' containment reference list. 76 * Returns the value of the '<em><b>Turnouts</b></em>' containment reference list.
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java
index 4760af9d..a19c1955 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java
@@ -305,6 +305,62 @@ public interface Modes3Package extends EPackage {
305 305
306 306
307 /** 307 /**
308 * The meta object id for the '{@link modes3.impl.SimpleSegmentImpl <em>Simple Segment</em>}' class.
309 * <!-- begin-user-doc -->
310 * <!-- end-user-doc -->
311 * @see modes3.impl.SimpleSegmentImpl
312 * @see modes3.impl.Modes3PackageImpl#getSimpleSegment()
313 * @generated
314 */
315 int SIMPLE_SEGMENT = 4;
316
317 /**
318 * The feature id for the '<em><b>Connected To</b></em>' reference list.
319 * <!-- begin-user-doc -->
320 * <!-- end-user-doc -->
321 * @generated
322 * @ordered
323 */
324 int SIMPLE_SEGMENT__CONNECTED_TO = SEGMENT__CONNECTED_TO;
325
326 /**
327 * The feature id for the '<em><b>Occupied By</b></em>' reference.
328 * <!-- begin-user-doc -->
329 * <!-- end-user-doc -->
330 * @generated
331 * @ordered
332 */
333 int SIMPLE_SEGMENT__OCCUPIED_BY = SEGMENT__OCCUPIED_BY;
334
335 /**
336 * The feature id for the '<em><b>Id</b></em>' attribute.
337 * <!-- begin-user-doc -->
338 * <!-- end-user-doc -->
339 * @generated
340 * @ordered
341 */
342 int SIMPLE_SEGMENT__ID = SEGMENT__ID;
343
344 /**
345 * The number of structural features of the '<em>Simple Segment</em>' class.
346 * <!-- begin-user-doc -->
347 * <!-- end-user-doc -->
348 * @generated
349 * @ordered
350 */
351 int SIMPLE_SEGMENT_FEATURE_COUNT = SEGMENT_FEATURE_COUNT + 0;
352
353 /**
354 * The number of operations of the '<em>Simple Segment</em>' class.
355 * <!-- begin-user-doc -->
356 * <!-- end-user-doc -->
357 * @generated
358 * @ordered
359 */
360 int SIMPLE_SEGMENT_OPERATION_COUNT = SEGMENT_OPERATION_COUNT + 0;
361
362
363 /**
308 * Returns the meta object for class '{@link modes3.Segment <em>Segment</em>}'. 364 * Returns the meta object for class '{@link modes3.Segment <em>Segment</em>}'.
309 * <!-- begin-user-doc --> 365 * <!-- begin-user-doc -->
310 * <!-- end-user-doc --> 366 * <!-- end-user-doc -->
@@ -477,6 +533,16 @@ public interface Modes3Package extends EPackage {
477 EAttribute getTrain_Speed(); 533 EAttribute getTrain_Speed();
478 534
479 /** 535 /**
536 * Returns the meta object for class '{@link modes3.SimpleSegment <em>Simple Segment</em>}'.
537 * <!-- begin-user-doc -->
538 * <!-- end-user-doc -->
539 * @return the meta object for class '<em>Simple Segment</em>'.
540 * @see modes3.SimpleSegment
541 * @generated
542 */
543 EClass getSimpleSegment();
544
545 /**
480 * Returns the factory that creates the instances of the model. 546 * Returns the factory that creates the instances of the model.
481 * <!-- begin-user-doc --> 547 * <!-- begin-user-doc -->
482 * <!-- end-user-doc --> 548 * <!-- end-user-doc -->
@@ -635,6 +701,16 @@ public interface Modes3Package extends EPackage {
635 */ 701 */
636 EAttribute TRAIN__SPEED = eINSTANCE.getTrain_Speed(); 702 EAttribute TRAIN__SPEED = eINSTANCE.getTrain_Speed();
637 703
704 /**
705 * The meta object literal for the '{@link modes3.impl.SimpleSegmentImpl <em>Simple Segment</em>}' class.
706 * <!-- begin-user-doc -->
707 * <!-- end-user-doc -->
708 * @see modes3.impl.SimpleSegmentImpl
709 * @see modes3.impl.Modes3PackageImpl#getSimpleSegment()
710 * @generated
711 */
712 EClass SIMPLE_SEGMENT = eINSTANCE.getSimpleSegment();
713
638 } 714 }
639 715
640} //Modes3Package 716} //Modes3Package
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/SimpleSegment.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/SimpleSegment.java
new file mode 100644
index 00000000..da77510f
--- /dev/null
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/SimpleSegment.java
@@ -0,0 +1,17 @@
1/**
2 */
3package modes3;
4
5
6/**
7 * <!-- begin-user-doc -->
8 * A representation of the model object '<em><b>Simple Segment</b></em>'.
9 * <!-- end-user-doc -->
10 *
11 *
12 * @see modes3.Modes3Package#getSimpleSegment()
13 * @model
14 * @generated
15 */
16public interface SimpleSegment extends Segment {
17} // SimpleSegment
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java
index 6ec86cb6..60947533 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java
@@ -60,6 +60,7 @@ public class Modes3FactoryImpl extends EFactoryImpl implements Modes3Factory {
60 case Modes3Package.MODES3_MODEL_ROOT: return createModes3ModelRoot(); 60 case Modes3Package.MODES3_MODEL_ROOT: return createModes3ModelRoot();
61 case Modes3Package.TURNOUT: return createTurnout(); 61 case Modes3Package.TURNOUT: return createTurnout();
62 case Modes3Package.TRAIN: return createTrain(); 62 case Modes3Package.TRAIN: return createTrain();
63 case Modes3Package.SIMPLE_SEGMENT: return createSimpleSegment();
63 default: 64 default:
64 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); 65 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
65 } 66 }
@@ -110,6 +111,16 @@ public class Modes3FactoryImpl extends EFactoryImpl implements Modes3Factory {
110 * <!-- end-user-doc --> 111 * <!-- end-user-doc -->
111 * @generated 112 * @generated
112 */ 113 */
114 public SimpleSegment createSimpleSegment() {
115 SimpleSegmentImpl simpleSegment = new SimpleSegmentImpl();
116 return simpleSegment;
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
113 public Modes3Package getModes3Package() { 124 public Modes3Package getModes3Package() {
114 return (Modes3Package)getEPackage(); 125 return (Modes3Package)getEPackage();
115 } 126 }
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java
index d1ee25ff..ccab1f29 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java
@@ -6,7 +6,7 @@ import java.util.Collection;
6 6
7import modes3.Modes3ModelRoot; 7import modes3.Modes3ModelRoot;
8import modes3.Modes3Package; 8import modes3.Modes3Package;
9import modes3.Segment; 9import modes3.SimpleSegment;
10import modes3.Train; 10import modes3.Train;
11import modes3.Turnout; 11import modes3.Turnout;
12 12
@@ -79,7 +79,7 @@ public class Modes3ModelRootImpl extends MinimalEObjectImpl.Container implements
79 * @generated 79 * @generated
80 * @ordered 80 * @ordered
81 */ 81 */
82 protected EList<Segment> segments; 82 protected EList<SimpleSegment> segments;
83 83
84 /** 84 /**
85 * The cached value of the '{@link #getTurnouts() <em>Turnouts</em>}' containment reference list. 85 * The cached value of the '{@link #getTurnouts() <em>Turnouts</em>}' containment reference list.
@@ -148,9 +148,9 @@ public class Modes3ModelRootImpl extends MinimalEObjectImpl.Container implements
148 * <!-- end-user-doc --> 148 * <!-- end-user-doc -->
149 * @generated 149 * @generated
150 */ 150 */
151 public EList<Segment> getSegments() { 151 public EList<SimpleSegment> getSegments() {
152 if (segments == null) { 152 if (segments == null) {
153 segments = new EObjectContainmentEList<Segment>(Segment.class, this, Modes3Package.MODES3_MODEL_ROOT__SEGMENTS); 153 segments = new EObjectContainmentEList<SimpleSegment>(SimpleSegment.class, this, Modes3Package.MODES3_MODEL_ROOT__SEGMENTS);
154 } 154 }
155 return segments; 155 return segments;
156 } 156 }
@@ -223,7 +223,7 @@ public class Modes3ModelRootImpl extends MinimalEObjectImpl.Container implements
223 return; 223 return;
224 case Modes3Package.MODES3_MODEL_ROOT__SEGMENTS: 224 case Modes3Package.MODES3_MODEL_ROOT__SEGMENTS:
225 getSegments().clear(); 225 getSegments().clear();
226 getSegments().addAll((Collection<? extends Segment>)newValue); 226 getSegments().addAll((Collection<? extends SimpleSegment>)newValue);
227 return; 227 return;
228 case Modes3Package.MODES3_MODEL_ROOT__TURNOUTS: 228 case Modes3Package.MODES3_MODEL_ROOT__TURNOUTS:
229 getTurnouts().clear(); 229 getTurnouts().clear();
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java
index 2b9e828c..557da4c1 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java
@@ -6,6 +6,7 @@ import modes3.Modes3Factory;
6import modes3.Modes3ModelRoot; 6import modes3.Modes3ModelRoot;
7import modes3.Modes3Package; 7import modes3.Modes3Package;
8import modes3.Segment; 8import modes3.Segment;
9import modes3.SimpleSegment;
9import modes3.Train; 10import modes3.Train;
10import modes3.Turnout; 11import modes3.Turnout;
11 12
@@ -52,6 +53,13 @@ public class Modes3PackageImpl extends EPackageImpl implements Modes3Package {
52 private EClass trainEClass = null; 53 private EClass trainEClass = null;
53 54
54 /** 55 /**
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @generated
59 */
60 private EClass simpleSegmentEClass = null;
61
62 /**
55 * Creates an instance of the model <b>Package</b>, registered with 63 * Creates an instance of the model <b>Package</b>, registered with
56 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package 64 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
57 * package URI value. 65 * package URI value.
@@ -261,6 +269,15 @@ public class Modes3PackageImpl extends EPackageImpl implements Modes3Package {
261 * <!-- end-user-doc --> 269 * <!-- end-user-doc -->
262 * @generated 270 * @generated
263 */ 271 */
272 public EClass getSimpleSegment() {
273 return simpleSegmentEClass;
274 }
275
276 /**
277 * <!-- begin-user-doc -->
278 * <!-- end-user-doc -->
279 * @generated
280 */
264 public Modes3Factory getModes3Factory() { 281 public Modes3Factory getModes3Factory() {
265 return (Modes3Factory)getEFactoryInstance(); 282 return (Modes3Factory)getEFactoryInstance();
266 } 283 }
@@ -303,6 +320,8 @@ public class Modes3PackageImpl extends EPackageImpl implements Modes3Package {
303 createEReference(trainEClass, TRAIN__LOCATION); 320 createEReference(trainEClass, TRAIN__LOCATION);
304 createEAttribute(trainEClass, TRAIN__ID); 321 createEAttribute(trainEClass, TRAIN__ID);
305 createEAttribute(trainEClass, TRAIN__SPEED); 322 createEAttribute(trainEClass, TRAIN__SPEED);
323
324 simpleSegmentEClass = createEClass(SIMPLE_SEGMENT);
306 } 325 }
307 326
308 /** 327 /**
@@ -334,6 +353,7 @@ public class Modes3PackageImpl extends EPackageImpl implements Modes3Package {
334 353
335 // Add supertypes to classes 354 // Add supertypes to classes
336 turnoutEClass.getESuperTypes().add(this.getSegment()); 355 turnoutEClass.getESuperTypes().add(this.getSegment());
356 simpleSegmentEClass.getESuperTypes().add(this.getSegment());
337 357
338 // Initialize classes, features, and operations; add parameters 358 // Initialize classes, features, and operations; add parameters
339 initEClass(segmentEClass, Segment.class, "Segment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 359 initEClass(segmentEClass, Segment.class, "Segment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -344,7 +364,7 @@ public class Modes3PackageImpl extends EPackageImpl implements Modes3Package {
344 initEClass(modes3ModelRootEClass, Modes3ModelRoot.class, "Modes3ModelRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 364 initEClass(modes3ModelRootEClass, Modes3ModelRoot.class, "Modes3ModelRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
345 initEAttribute(getModes3ModelRoot_Id(), ecorePackage.getEInt(), "id", null, 0, 1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 365 initEAttribute(getModes3ModelRoot_Id(), ecorePackage.getEInt(), "id", null, 0, 1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
346 initEReference(getModes3ModelRoot_Trains(), this.getTrain(), null, "trains", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 366 initEReference(getModes3ModelRoot_Trains(), this.getTrain(), null, "trains", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
347 initEReference(getModes3ModelRoot_Segments(), this.getSegment(), null, "segments", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 367 initEReference(getModes3ModelRoot_Segments(), this.getSimpleSegment(), null, "segments", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
348 initEReference(getModes3ModelRoot_Turnouts(), this.getTurnout(), null, "turnouts", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 368 initEReference(getModes3ModelRoot_Turnouts(), this.getTurnout(), null, "turnouts", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
349 369
350 initEClass(turnoutEClass, Turnout.class, "Turnout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 370 initEClass(turnoutEClass, Turnout.class, "Turnout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -356,6 +376,8 @@ public class Modes3PackageImpl extends EPackageImpl implements Modes3Package {
356 initEAttribute(getTrain_Id(), ecorePackage.getEInt(), "id", null, 0, 1, Train.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 376 initEAttribute(getTrain_Id(), ecorePackage.getEInt(), "id", null, 0, 1, Train.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
357 initEAttribute(getTrain_Speed(), ecorePackage.getEDouble(), "speed", null, 0, 1, Train.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 377 initEAttribute(getTrain_Speed(), ecorePackage.getEDouble(), "speed", null, 0, 1, Train.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
358 378
379 initEClass(simpleSegmentEClass, SimpleSegment.class, "SimpleSegment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
380
359 // Create resource 381 // Create resource
360 createResource(eNS_URI); 382 createResource(eNS_URI);
361 } 383 }
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/SimpleSegmentImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/SimpleSegmentImpl.java
new file mode 100644
index 00000000..e3fd6c34
--- /dev/null
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/SimpleSegmentImpl.java
@@ -0,0 +1,37 @@
1/**
2 */
3package modes3.impl;
4
5import modes3.Modes3Package;
6import modes3.SimpleSegment;
7
8import org.eclipse.emf.ecore.EClass;
9
10/**
11 * <!-- begin-user-doc -->
12 * An implementation of the model object '<em><b>Simple Segment</b></em>'.
13 * <!-- end-user-doc -->
14 *
15 * @generated
16 */
17public class SimpleSegmentImpl extends SegmentImpl implements SimpleSegment {
18 /**
19 * <!-- begin-user-doc -->
20 * <!-- end-user-doc -->
21 * @generated
22 */
23 protected SimpleSegmentImpl() {
24 super();
25 }
26
27 /**
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 @Override
33 protected EClass eStaticClass() {
34 return Modes3Package.Literals.SIMPLE_SEGMENT;
35 }
36
37} //SimpleSegmentImpl
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java
index 86568e9d..9c5c8d2d 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java
@@ -84,6 +84,10 @@ public class Modes3AdapterFactory extends AdapterFactoryImpl {
84 return createTrainAdapter(); 84 return createTrainAdapter();
85 } 85 }
86 @Override 86 @Override
87 public Adapter caseSimpleSegment(SimpleSegment object) {
88 return createSimpleSegmentAdapter();
89 }
90 @Override
87 public Adapter defaultCase(EObject object) { 91 public Adapter defaultCase(EObject object) {
88 return createEObjectAdapter(); 92 return createEObjectAdapter();
89 } 93 }
@@ -160,6 +164,20 @@ public class Modes3AdapterFactory extends AdapterFactoryImpl {
160 } 164 }
161 165
162 /** 166 /**
167 * Creates a new adapter for an object of class '{@link modes3.SimpleSegment <em>Simple Segment</em>}'.
168 * <!-- begin-user-doc -->
169 * This default implementation returns null so that we can easily ignore cases;
170 * it's useful to ignore a case when inheritance will catch all the cases anyway.
171 * <!-- end-user-doc -->
172 * @return the new adapter.
173 * @see modes3.SimpleSegment
174 * @generated
175 */
176 public Adapter createSimpleSegmentAdapter() {
177 return null;
178 }
179
180 /**
163 * Creates a new adapter for the default case. 181 * Creates a new adapter for the default case.
164 * <!-- begin-user-doc --> 182 * <!-- begin-user-doc -->
165 * This default implementation returns null. 183 * This default implementation returns null.
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java
index 5dab272b..0c28861a 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java
@@ -91,6 +91,13 @@ public class Modes3Switch<T> extends Switch<T> {
91 if (result == null) result = defaultCase(theEObject); 91 if (result == null) result = defaultCase(theEObject);
92 return result; 92 return result;
93 } 93 }
94 case Modes3Package.SIMPLE_SEGMENT: {
95 SimpleSegment simpleSegment = (SimpleSegment)theEObject;
96 T result = caseSimpleSegment(simpleSegment);
97 if (result == null) result = caseSegment(simpleSegment);
98 if (result == null) result = defaultCase(theEObject);
99 return result;
100 }
94 default: return defaultCase(theEObject); 101 default: return defaultCase(theEObject);
95 } 102 }
96 } 103 }
@@ -156,6 +163,21 @@ public class Modes3Switch<T> extends Switch<T> {
156 } 163 }
157 164
158 /** 165 /**
166 * Returns the result of interpreting the object as an instance of '<em>Simple Segment</em>'.
167 * <!-- begin-user-doc -->
168 * This implementation returns null;
169 * returning a non-null result will terminate the switch.
170 * <!-- end-user-doc -->
171 * @param object the target of the switch.
172 * @return the result of interpreting the object as an instance of '<em>Simple Segment</em>'.
173 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
174 * @generated
175 */
176 public T caseSimpleSegment(SimpleSegment object) {
177 return null;
178 }
179
180 /**
159 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. 181 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
160 * <!-- begin-user-doc --> 182 * <!-- begin-user-doc -->
161 * This implementation returns null; 183 * This implementation returns null;
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.aird_deactivated b/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.aird_deactivated
deleted file mode 100644
index f5400732..00000000
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.aird_deactivated
+++ /dev/null
@@ -1,1531 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
3 <viewpoint:DAnalysis uid="_R4-4YA7_Eee1dfpzdcS6YA" selectedViews="_R6jlsA7_Eee1dfpzdcS6YA _OHrasBFUEeeHWeeZwj2u8w _OH-VoBFUEeeHWeeZwj2u8w _OIvxsBFUEeeHWeeZwj2u8w" version="14.3.0.201909031200">
4 <semanticResources>http://www.eclipse.org/emf/2002/Ecore</semanticResources>
5 <semanticResources>modes3.ecore</semanticResources>
6 <semanticResources>modes3.genmodel</semanticResources>
7 <semanticResources>../src/modes3/queries/Modes3Queries.vql</semanticResources>
8 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch</semanticResources>
9 <semanticResources>java:/Objects/java.lang.Object</semanticResources>
10 <semanticResources>java:/Objects/jdk.internal.HotSpotIntrinsicCandidate</semanticResources>
11 <semanticResources>java:/Objects/java.lang.annotation.Target</semanticResources>
12 <semanticResources>java:/Objects/java.lang.annotation.ElementType</semanticResources>
13 <semanticResources>java:/Objects/java.lang.Enum</semanticResources>
14 <semanticResources>java:/Objects/java.lang.Comparable</semanticResources>
15 <semanticResources>java:/Primitives</semanticResources>
16 <semanticResources>java:/Objects/java.lang.CloneNotSupportedException</semanticResources>
17 <semanticResources>java:/Objects/java.lang.Exception</semanticResources>
18 <semanticResources>java:/Objects/java.lang.Throwable</semanticResources>
19 <semanticResources>java:/Objects/java.io.Serializable</semanticResources>
20 <semanticResources>java:/Objects/java.lang.Deprecated</semanticResources>
21 <semanticResources>java:/Objects/java.lang.annotation.Retention</semanticResources>
22 <semanticResources>java:/Objects/java.lang.annotation.RetentionPolicy</semanticResources>
23 <semanticResources>java:/Objects/java.lang.String</semanticResources>
24 <semanticResources>java:/Objects/java.lang.CharSequence</semanticResources>
25 <semanticResources>java:/Objects/java.util.stream.IntStream</semanticResources>
26 <semanticResources>java:/Objects/java.util.stream.BaseStream</semanticResources>
27 <semanticResources>java:/Objects/java.lang.AutoCloseable</semanticResources>
28 <semanticResources>java:/Objects/java.lang.Class</semanticResources>
29 <semanticResources>java:/Objects/java.lang.reflect.GenericDeclaration</semanticResources>
30 <semanticResources>java:/Objects/java.lang.reflect.AnnotatedElement</semanticResources>
31 <semanticResources>java:/Objects/java.lang.annotation.Annotation</semanticResources>
32 <semanticResources>java:/Objects/java.lang.InterruptedException</semanticResources>
33 <semanticResources>java:/Objects/java.lang.StackTraceElement</semanticResources>
34 <semanticResources>java:/Objects/java.lang.Module</semanticResources>
35 <semanticResources>java:/Objects/java.lang.WeakPairMap</semanticResources>
36 <semanticResources>java:/Objects/java.lang.ref.ReferenceQueue</semanticResources>
37 <semanticResources>java:/Objects/java.lang.ref.Reference</semanticResources>
38 <semanticResources>java:/Objects/java.lang.Thread</semanticResources>
39 <semanticResources>java:/Objects/java.lang.Runnable</semanticResources>
40 <semanticResources>java:/Objects/java.lang.FunctionalInterface</semanticResources>
41 <semanticResources>java:/Objects/java.lang.annotation.Documented</semanticResources>
42 <semanticResources>java:/Objects/java.io.ObjectInputStream</semanticResources>
43 <semanticResources>java:/Objects/java.io.InputStream</semanticResources>
44 <semanticResources>java:/Objects/java.io.Closeable</semanticResources>
45 <semanticResources>java:/Objects/java.io.IOException</semanticResources>
46 <semanticResources>java:/Objects/java.util.Comparator</semanticResources>
47 <semanticResources>java:/Objects/java.util.function.Function</semanticResources>
48 <semanticResources>java:/Objects/java.lang.ClassNotFoundException</semanticResources>
49 <semanticResources>java:/Objects/java.lang.ReflectiveOperationException</semanticResources>
50 <semanticResources>java:/Objects/java.lang.StringBuffer</semanticResources>
51 <semanticResources>java:/Objects/java.lang.AbstractStringBuilder</semanticResources>
52 <semanticResources>java:/Objects/java.lang.Appendable</semanticResources>
53 <semanticResources>java:/Objects/java.io.ObjectStreamException</semanticResources>
54 <semanticResources>java:/Objects/java.io.PrintStream</semanticResources>
55 <semanticResources>java:/Objects/java.io.FilterOutputStream</semanticResources>
56 <semanticResources>java:/Objects/java.io.OutputStream</semanticResources>
57 <semanticResources>java:/Objects/java.io.Flushable</semanticResources>
58 <semanticResources>java:/Objects/java.io.ObjectInput</semanticResources>
59 <semanticResources>java:/Objects/java.io.DataInput</semanticResources>
60 <semanticResources>java:/Objects/java.io.ObjectStreamConstants</semanticResources>
61 <semanticResources>java:/Objects/java.io.SerializablePermission</semanticResources>
62 <semanticResources>java:/Objects/java.security.BasicPermission</semanticResources>
63 <semanticResources>java:/Objects/java.security.Permission</semanticResources>
64 <semanticResources>java:/Objects/java.security.Guard</semanticResources>
65 <semanticResources>java:/Objects/java.lang.SecurityException</semanticResources>
66 <semanticResources>java:/Objects/java.lang.RuntimeException</semanticResources>
67 <semanticResources>java:/Objects/java.lang.StringBuilder</semanticResources>
68 <semanticResources>java:/Objects/java.io.ObjectOutputStream</semanticResources>
69 <semanticResources>java:/Objects/java.io.ObjectOutput</semanticResources>
70 <semanticResources>java:/Objects/java.io.DataOutput</semanticResources>
71 <semanticResources>java:/Objects/java.io.DataInputStream</semanticResources>
72 <semanticResources>java:/Objects/java.io.FilterInputStream</semanticResources>
73 <semanticResources>java:/Objects/java.util.concurrent.ConcurrentMap</semanticResources>
74 <semanticResources>java:/Objects/java.util.Map</semanticResources>
75 <semanticResources>java:/Objects/java.util.function.BiFunction</semanticResources>
76 <semanticResources>java:/Objects/java.io.PrintWriter</semanticResources>
77 <semanticResources>java:/Objects/java.io.Writer</semanticResources>
78 <semanticResources>java:/Objects/java.io.ObjectStreamClass</semanticResources>
79 <semanticResources>java:/Objects/java.io.InvalidClassException</semanticResources>
80 <semanticResources>java:/Objects/java.util.Set</semanticResources>
81 <semanticResources>java:/Objects/java.util.Collection</semanticResources>
82 <semanticResources>java:/Objects/java.lang.Iterable</semanticResources>
83 <semanticResources>java:/Objects/java.util.function.Consumer</semanticResources>
84 <semanticResources>java:/Objects/java.util.List</semanticResources>
85 <semanticResources>java:/Objects/java.util.Iterator</semanticResources>
86 <semanticResources>java:/Objects/java.lang.Boolean</semanticResources>
87 <semanticResources>java:/Objects/java.lang.StackFrameInfo</semanticResources>
88 <semanticResources>java:/Objects/java.lang.StackWalker</semanticResources>
89 <semanticResources>java:/Objects/java.lang.invoke.MethodType</semanticResources>
90 <semanticResources>java:/Objects/java.lang.ref.WeakReference</semanticResources>
91 <semanticResources>java:/Objects/java.lang.ThreadGroup</semanticResources>
92 <semanticResources>java:/Objects/java.lang.Void</semanticResources>
93 <semanticResources>java:/Objects/java.io.ObjectInputFilter</semanticResources>
94 <semanticResources>java:/Objects/java.lang.IllegalArgumentException</semanticResources>
95 <semanticResources>java:/Objects/java.io.UnsupportedEncodingException</semanticResources>
96 <semanticResources>java:/Objects/java.lang.reflect.Type</semanticResources>
97 <semanticResources>java:/Objects/java.lang.System</semanticResources>
98 <semanticResources>java:/Objects/java.util.function.Supplier</semanticResources>
99 <semanticResources>java:/Objects/java.lang.ClassLoader</semanticResources>
100 <semanticResources>java:/Objects/java.util.Deque</semanticResources>
101 <semanticResources>java:/Objects/java.util.Queue</semanticResources>
102 <semanticResources>java:/Objects/java.util.stream.Stream</semanticResources>
103 <semanticResources>java:/Objects/java.util.function.Predicate</semanticResources>
104 <semanticResources>java:/Objects/java.lang.module.ModuleDescriptor</semanticResources>
105 <semanticResources>java:/Objects/java.util.Optional</semanticResources>
106 <semanticResources>java:/Objects/java.io.ObjectInputValidation</semanticResources>
107 <semanticResources>java:/Objects/java.io.InvalidObjectException</semanticResources>
108 <semanticResources>java:/Objects/sun.reflect.annotation.AnnotationType</semanticResources>
109 <semanticResources>java:/Objects/java.lang.reflect.Method</semanticResources>
110 <semanticResources>java:/Objects/java.lang.reflect.Executable</semanticResources>
111 <semanticResources>java:/Objects/java.lang.reflect.AccessibleObject</semanticResources>
112 <semanticResources>java:/Objects/jdk.internal.reflect.CallerSensitive</semanticResources>
113 <semanticResources>java:/Objects/java.lang.ModuleLayer</semanticResources>
114 <semanticResources>java:/Objects/java.lang.module.Configuration</semanticResources>
115 <semanticResources>java:/Objects/java.lang.module.Resolver</semanticResources>
116 <semanticResources>java:/Objects/java.lang.module.ModuleFinder</semanticResources>
117 <semanticResources>java:/Objects/java.lang.module.ModuleReference</semanticResources>
118 <semanticResources>java:/Objects/java.net.URI</semanticResources>
119 <semanticResources>java:/Objects/java.net.URISyntaxException</semanticResources>
120 <semanticResources>java:/Objects/java.lang.ref.SoftReference</semanticResources>
121 <semanticResources>java:/Objects/jdk.internal.vm.annotation.ForceInline</semanticResources>
122 <semanticResources>java:/Objects/java.lang.module.ResolvedModule</semanticResources>
123 <semanticResources>java:/Objects/java.security.AccessControlContext</semanticResources>
124 <semanticResources>java:/Objects/java.security.ProtectionDomain</semanticResources>
125 <semanticResources>java:/Objects/sun.security.util.Debug</semanticResources>
126 <semanticResources>java:/Objects/java.math.BigInteger</semanticResources>
127 <semanticResources>java:/Objects/java.lang.Number</semanticResources>
128 <semanticResources>java:/Objects/java.io.StreamCorruptedException</semanticResources>
129 <semanticResources>java:/Objects/jdk.internal.misc.Unsafe</semanticResources>
130 <semanticResources>java:/Objects/java.lang.InstantiationException</semanticResources>
131 <semanticResources>java:/Objects/java.lang.reflect.Constructor</semanticResources>
132 <semanticResources>java:/Objects/jdk.internal.reflect.ConstructorAccessor</semanticResources>
133 <semanticResources>java:/Objects/java.lang.reflect.InvocationTargetException</semanticResources>
134 <semanticResources>java:/Objects/java.lang.reflect.Field</semanticResources>
135 <semanticResources>java:/Objects/java.lang.reflect.Member</semanticResources>
136 <semanticResources>java:/Objects/java.io.Externalizable</semanticResources>
137 <semanticResources>java:/Objects/java.io.NotActiveException</semanticResources>
138 <semanticResources>java:/Objects/java.lang.SecurityManager</semanticResources>
139 <semanticResources>java:/Objects/java.net.InetAddress</semanticResources>
140 <semanticResources>java:/Objects/java.net.UnknownHostException</semanticResources>
141 <semanticResources>java:/Objects/java.lang.reflect.AnnotatedType</semanticResources>
142 <semanticResources>java:/Objects/java.io.SerialCallbackContext</semanticResources>
143 <semanticResources>java:/Objects/java.security.PermissionCollection</semanticResources>
144 <semanticResources>java:/Objects/java.util.Enumeration</semanticResources>
145 <semanticResources>java:/Objects/java.util.stream.Collector</semanticResources>
146 <semanticResources>java:/Objects/java.util.function.BiConsumer</semanticResources>
147 <semanticResources>java:/Objects/java.util.concurrent.ConcurrentHashMap</semanticResources>
148 <semanticResources>java:/Objects/java.util.AbstractMap</semanticResources>
149 <semanticResources>java:/Objects/java.util.stream.DoubleStream</semanticResources>
150 <semanticResources>java:/Objects/java.lang.Double</semanticResources>
151 <semanticResources>java:/Objects/java.lang.NumberFormatException</semanticResources>
152 <semanticResources>java:/Objects/jdk.internal.reflect.ConstantPool</semanticResources>
153 <semanticResources>java:/Objects/sun.nio.ch.Interruptible</semanticResources>
154 <semanticResources>java:/Objects/java.util.stream.LongStream</semanticResources>
155 <semanticResources>java:/Objects/java.lang.Long</semanticResources>
156 <semanticResources>java:/Objects/java.lang.ThreadLocal</semanticResources>
157 <semanticResources>java:/Objects/java.util.concurrent.atomic.AtomicInteger</semanticResources>
158 <semanticResources>java:/Objects/java.util.function.IntBinaryOperator</semanticResources>
159 <semanticResources>java:/Objects/jdk.internal.vm.annotation.Contended</semanticResources>
160 <semanticResources>java:/Objects/java.security.DomainCombiner</semanticResources>
161 <semanticResources>java:/Objects/java.util.function.UnaryOperator</semanticResources>
162 <semanticResources>java:/Objects/java.security.AccessControlException</semanticResources>
163 <semanticResources>java:/Objects/java.lang.NoSuchMethodException</semanticResources>
164 <semanticResources>java:/Objects/java.lang.NoSuchFieldException</semanticResources>
165 <semanticResources>java:/Objects/sun.reflect.generics.factory.GenericsFactory</semanticResources>
166 <semanticResources>java:/Objects/java.lang.reflect.TypeVariable</semanticResources>
167 <semanticResources>java:/Objects/java.util.function.ToDoubleFunction</semanticResources>
168 <semanticResources>java:/Objects/jdk.internal.misc.JavaSecurityAccess</semanticResources>
169 <semanticResources>java:/Objects/java.security.PrivilegedAction</semanticResources>
170 <semanticResources>java:/Objects/java.util.function.ToIntFunction</semanticResources>
171 <semanticResources>java:/Objects/java.security.CodeSource</semanticResources>
172 <semanticResources>java:/Objects/java.net.URL</semanticResources>
173 <semanticResources>java:/Objects/java.net.URLStreamHandlerFactory</semanticResources>
174 <semanticResources>java:/Objects/java.net.URLStreamHandler</semanticResources>
175 <semanticResources>java:/Objects/java.net.URLConnection</semanticResources>
176 <semanticResources>java:/Objects/java.net.UnknownServiceException</semanticResources>
177 <semanticResources>java:/Objects/sun.reflect.generics.repository.ClassRepository</semanticResources>
178 <semanticResources>java:/Objects/sun.reflect.generics.repository.GenericDeclRepository</semanticResources>
179 <semanticResources>java:/Objects/sun.reflect.generics.repository.AbstractRepository</semanticResources>
180 <semanticResources>java:/Objects/sun.reflect.generics.visitor.Reifier</semanticResources>
181 <semanticResources>java:/Objects/sun.reflect.generics.visitor.TypeTreeVisitor</semanticResources>
182 <semanticResources>java:/Objects/sun.reflect.generics.tree.ArrayTypeSignature</semanticResources>
183 <semanticResources>java:/Objects/sun.reflect.generics.tree.FieldTypeSignature</semanticResources>
184 <semanticResources>java:/Objects/sun.reflect.generics.tree.BaseType</semanticResources>
185 <semanticResources>java:/Objects/sun.reflect.generics.tree.TypeSignature</semanticResources>
186 <semanticResources>java:/Objects/sun.reflect.generics.tree.ReturnType</semanticResources>
187 <semanticResources>java:/Objects/sun.reflect.generics.tree.TypeTree</semanticResources>
188 <semanticResources>java:/Objects/sun.reflect.generics.tree.Tree</semanticResources>
189 <semanticResources>java:/Objects/java.util.function.ToLongFunction</semanticResources>
190 <semanticResources>java:/Objects/java.security.Principal</semanticResources>
191 <semanticResources>java:/Objects/javax.security.auth.Subject</semanticResources>
192 <semanticResources>java:/Objects/javax.security.auth.AuthPermission</semanticResources>
193 <semanticResources>java:/Objects/java.security.cert.Certificate</semanticResources>
194 <semanticResources>java:/Objects/java.security.cert.CertificateEncodingException</semanticResources>
195 <semanticResources>java:/Objects/java.security.cert.CertificateException</semanticResources>
196 <semanticResources>java:/Objects/java.security.GeneralSecurityException</semanticResources>
197 <semanticResources>java:/Objects/java.nio.charset.Charset</semanticResources>
198 <semanticResources>java:/Objects/java.nio.charset.spi.CharsetProvider</semanticResources>
199 <semanticResources>java:/Objects/java.lang.SafeVarargs</semanticResources>
200 <semanticResources>java:/Objects/java.security.CodeSigner</semanticResources>
201 <semanticResources>java:/Objects/java.security.cert.CertPath</semanticResources>
202 <semanticResources>java:/Objects/java.util.function.BinaryOperator</semanticResources>
203 <semanticResources>java:/Objects/java.security.cert.CertificateFactory</semanticResources>
204 <semanticResources>java:/Objects/java.security.cert.CertificateFactorySpi</semanticResources>
205 <semanticResources>java:/Objects/java.security.cert.CRLException</semanticResources>
206 <semanticResources>java:/Objects/java.util.Locale</semanticResources>
207 <semanticResources>java:/Objects/java.lang.Cloneable</semanticResources>
208 <semanticResources>java:/Objects/java.util.function.IntFunction</semanticResources>
209 <semanticResources>java:/Objects/java.net.SocketPermission</semanticResources>
210 <semanticResources>java:/Objects/java.net.MalformedURLException</semanticResources>
211 <semanticResources>java:/Objects/java.lang.PublicMethods</semanticResources>
212 <semanticResources>java:/Objects/jdk.internal.reflect.ReflectionFactory</semanticResources>
213 <semanticResources>java:/Objects/java.lang.invoke.MethodHandle</semanticResources>
214 <semanticResources>java:/Objects/java.lang.invoke.LambdaForm</semanticResources>
215 <semanticResources>java:/Objects/sun.invoke.util.Wrapper</semanticResources>
216 <semanticResources>java:/Objects/java.lang.ClassCastException</semanticResources>
217 <semanticResources>java:/Objects/java.lang.Package</semanticResources>
218 <semanticResources>java:/Objects/java.lang.NamedPackage</semanticResources>
219 <semanticResources>java:/Objects/java.util.Spliterator</semanticResources>
220 <semanticResources>java:/Objects/java.util.function.DoubleConsumer</semanticResources>
221 <semanticResources>java:/Objects/java.net.Proxy</semanticResources>
222 <semanticResources>java:/Objects/java.net.SocketAddress</semanticResources>
223 <semanticResources>java:/Objects/java.lang.Integer</semanticResources>
224 <semanticResources>java:/Objects/java.net.spi.URLStreamHandlerProvider</semanticResources>
225 <semanticResources>java:/Objects/java.util.function.IntConsumer</semanticResources>
226 <semanticResources>java:/Objects/java.util.Hashtable</semanticResources>
227 <semanticResources>java:/Objects/java.util.Dictionary</semanticResources>
228 <semanticResources>java:/Objects/java.util.function.LongConsumer</semanticResources>
229 <semanticResources>java:/Objects/java.io.ObjectStreamField</semanticResources>
230 <semanticResources>java:/Objects/java.util.Random</semanticResources>
231 <semanticResources>java:/Objects/java.util.concurrent.atomic.AtomicLong</semanticResources>
232 <semanticResources>java:/Objects/java.util.function.LongBinaryOperator</semanticResources>
233 <semanticResources>java:/Objects/java.net.UrlDeserializedState</semanticResources>
234 <semanticResources>java:/Objects/java.util.function.LongUnaryOperator</semanticResources>
235 <semanticResources>java:/Objects/java.io.FileDescriptor</semanticResources>
236 <semanticResources>java:/Objects/jdk.internal.ref.PhantomCleanable</semanticResources>
237 <semanticResources>java:/Objects/java.lang.ref.PhantomReference</semanticResources>
238 <semanticResources>java:/Objects/java.io.DataOutputStream</semanticResources>
239 <semanticResources>java:/Objects/java.util.ListIterator</semanticResources>
240 <semanticResources>java:/Objects/java.io.SyncFailedException</semanticResources>
241 <semanticResources>java:/Objects/java.lang.IllegalAccessException</semanticResources>
242 <semanticResources>java:/Objects/java.lang.ClassValue</semanticResources>
243 <semanticResources>java:/Objects/java.util.WeakHashMap</semanticResources>
244 <semanticResources>java:/Objects/java.util.AbstractSet</semanticResources>
245 <semanticResources>java:/Objects/java.util.AbstractCollection</semanticResources>
246 <semanticResources>java:/Objects/jdk.internal.reflect.FieldAccessor</semanticResources>
247 <semanticResources>java:/Objects/sun.reflect.generics.repository.FieldRepository</semanticResources>
248 <semanticResources>java:/Objects/jdk.internal.reflect.MethodAccessor</semanticResources>
249 <semanticResources>java:/Objects/jdk.internal.reflect.LangReflectAccess</semanticResources>
250 <semanticResources>java:/Objects/java.util.function.DoublePredicate</semanticResources>
251 <semanticResources>java:/Objects/java.lang.ref.Cleaner</semanticResources>
252 <semanticResources>java:/Objects/java.util.concurrent.ThreadFactory</semanticResources>
253 <semanticResources>java:/Objects/java.io.OptionalDataException</semanticResources>
254 <semanticResources>java:/Objects/java.util.OptionalDouble</semanticResources>
255 <semanticResources>java:/Objects/java.util.function.DoubleSupplier</semanticResources>
256 <semanticResources>java:/Objects/jdk.internal.ref.CleanerImpl</semanticResources>
257 <semanticResources>java:/Objects/jdk.internal.ref.SoftCleanable</semanticResources>
258 <semanticResources>java:/Objects/sun.reflect.generics.repository.ConstructorRepository</semanticResources>
259 <semanticResources>java:/Objects/sun.reflect.generics.tree.MethodTypeSignature</semanticResources>
260 <semanticResources>java:/Objects/sun.reflect.generics.tree.Signature</semanticResources>
261 <semanticResources>java:/Objects/sun.reflect.generics.tree.FormalTypeParameter</semanticResources>
262 <semanticResources>java:/Objects/sun.reflect.generics.tree.TypeArgument</semanticResources>
263 <semanticResources>java:/Objects/sun.reflect.generics.tree.BooleanSignature</semanticResources>
264 <semanticResources>java:/Objects/sun.reflect.generics.tree.BottomSignature</semanticResources>
265 <semanticResources>java:/Objects/sun.reflect.generics.tree.ByteSignature</semanticResources>
266 <semanticResources>java:/Objects/sun.reflect.generics.tree.CharSignature</semanticResources>
267 <semanticResources>java:/Objects/sun.reflect.generics.tree.ClassTypeSignature</semanticResources>
268 <semanticResources>java:/Objects/sun.reflect.generics.tree.SimpleClassTypeSignature</semanticResources>
269 <semanticResources>java:/Objects/sun.reflect.generics.tree.DoubleSignature</semanticResources>
270 <semanticResources>java:/Objects/sun.reflect.generics.tree.FloatSignature</semanticResources>
271 <semanticResources>java:/Objects/sun.reflect.generics.tree.IntSignature</semanticResources>
272 <semanticResources>java:/Objects/sun.reflect.generics.tree.LongSignature</semanticResources>
273 <semanticResources>java:/Objects/sun.reflect.generics.tree.ShortSignature</semanticResources>
274 <semanticResources>java:/Objects/sun.reflect.generics.tree.TypeVariableSignature</semanticResources>
275 <semanticResources>java:/Objects/sun.reflect.generics.tree.VoidDescriptor</semanticResources>
276 <semanticResources>java:/Objects/sun.reflect.generics.tree.Wildcard</semanticResources>
277 <semanticResources>java:/Objects/sun.reflect.generics.visitor.Visitor</semanticResources>
278 <semanticResources>java:/Objects/sun.reflect.generics.tree.ClassSignature</semanticResources>
279 <semanticResources>java:/Objects/sun.reflect.generics.repository.MethodRepository</semanticResources>
280 <semanticResources>java:/Objects/jdk.internal.ref.WeakCleanable</semanticResources>
281 <semanticResources>java:/Objects/java.lang.invoke.BoundMethodHandle</semanticResources>
282 <semanticResources>java:/Objects/java.lang.invoke.ClassSpecializer</semanticResources>
283 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.MethodVisitor</semanticResources>
284 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.AnnotationVisitor</semanticResources>
285 <semanticResources>java:/Objects/java.lang.invoke.MemberName</semanticResources>
286 <semanticResources>java:/Objects/java.lang.invoke.ResolvedMethodName</semanticResources>
287 <semanticResources>java:/Objects/java.lang.invoke.MethodHandleImpl</semanticResources>
288 <semanticResources>java:/Objects/java.lang.invoke.DelegatingMethodHandle</semanticResources>
289 <semanticResources>java:/Objects/java.lang.reflect.Parameter</semanticResources>
290 <semanticResources>java:/Objects/java.lang.invoke.MethodTypeForm</semanticResources>
291 <semanticResources>java:/Objects/jdk.internal.vm.annotation.Stable</semanticResources>
292 <semanticResources>java:/Objects/java.util.function.IntUnaryOperator</semanticResources>
293 <semanticResources>java:/Objects/java.util.function.IntPredicate</semanticResources>
294 <semanticResources>java:/Objects/java.util.function.ObjIntConsumer</semanticResources>
295 <semanticResources>java:/Objects/java.util.OptionalInt</semanticResources>
296 <semanticResources>java:/Objects/java.util.function.IntSupplier</semanticResources>
297 <semanticResources>java:/Objects/java.util.PrimitiveIterator</semanticResources>
298 <semanticResources>java:/Objects/java.util.function.IntToDoubleFunction</semanticResources>
299 <semanticResources>java:/Objects/java.util.function.IntToLongFunction</semanticResources>
300 <semanticResources>java:/Objects/java.util.IntSummaryStatistics</semanticResources>
301 <semanticResources>java:/Objects/java.lang.TypeNotPresentException</semanticResources>
302 <semanticResources>java:/Objects/java.lang.UnsupportedOperationException</semanticResources>
303 <semanticResources>java:/Objects/java.io.FileNotFoundException</semanticResources>
304 <semanticResources>java:/Objects/java.util.function.ObjDoubleConsumer</semanticResources>
305 <semanticResources>java:/Objects/java.util.function.DoubleFunction</semanticResources>
306 <semanticResources>java:/Objects/java.util.function.DoubleUnaryOperator</semanticResources>
307 <semanticResources>java:/Objects/java.util.function.DoubleToIntFunction</semanticResources>
308 <semanticResources>java:/Objects/java.util.function.DoubleToLongFunction</semanticResources>
309 <semanticResources>java:/Objects/java.util.function.DoubleBinaryOperator</semanticResources>
310 <semanticResources>java:/Objects/java.util.DoubleSummaryStatistics</semanticResources>
311 <semanticResources>java:/Objects/java.lang.invoke.Invokers</semanticResources>
312 <semanticResources>java:/Objects/java.lang.invoke.VarHandle</semanticResources>
313 <semanticResources>java:/Objects/java.lang.invoke.VarForm</semanticResources>
314 <semanticResources>java:/Objects/java.lang.invoke.LambdaFormEditor</semanticResources>
315 <semanticResources>java:/Objects/java.lang.invoke.LambdaFormBuffer</semanticResources>
316 <semanticResources>java:/Objects/java.util.ArrayList</semanticResources>
317 <semanticResources>java:/Objects/java.util.AbstractList</semanticResources>
318 <semanticResources>java:/Objects/java.util.RandomAccess</semanticResources>
319 <semanticResources>java:/Objects/java.lang.IndexOutOfBoundsException</semanticResources>
320 <semanticResources>java:/Objects/java.util.function.LongPredicate</semanticResources>
321 <semanticResources>java:/Objects/java.util.function.ObjLongConsumer</semanticResources>
322 <semanticResources>java:/Objects/java.util.OptionalLong</semanticResources>
323 <semanticResources>java:/Objects/java.util.function.LongSupplier</semanticResources>
324 <semanticResources>java:/Objects/java.util.function.LongFunction</semanticResources>
325 <semanticResources>java:/Objects/java.util.function.LongToDoubleFunction</semanticResources>
326 <semanticResources>java:/Objects/java.util.function.LongToIntFunction</semanticResources>
327 <semanticResources>java:/Objects/java.util.LongSummaryStatistics</semanticResources>
328 <semanticResources>java:/Objects/java.util.concurrent.CountedCompleter</semanticResources>
329 <semanticResources>java:/Objects/java.util.concurrent.ForkJoinTask</semanticResources>
330 <semanticResources>java:/Objects/java.util.concurrent.Future</semanticResources>
331 <semanticResources>java:/Objects/java.util.concurrent.ExecutionException</semanticResources>
332 <semanticResources>java:/Objects/java.io.File</semanticResources>
333 <semanticResources>java:/Objects/java.security.SecureRandom</semanticResources>
334 <semanticResources>java:/Objects/java.util.regex.Pattern</semanticResources>
335 <semanticResources>java:/Objects/java.util.regex.Matcher</semanticResources>
336 <semanticResources>java:/Objects/java.util.regex.MatchResult</semanticResources>
337 <semanticResources>java:/Objects/java.util.function.ToDoubleBiFunction</semanticResources>
338 <semanticResources>java:/Objects/java.lang.invoke.CallSite</semanticResources>
339 <semanticResources>java:/Objects/java.lang.invoke.WrongMethodTypeException</semanticResources>
340 <semanticResources>java:/Objects/java.io.OutputStreamWriter</semanticResources>
341 <semanticResources>java:/Objects/java.nio.charset.CharsetEncoder</semanticResources>
342 <semanticResources>java:/Objects/java.nio.CharBuffer</semanticResources>
343 <semanticResources>java:/Objects/java.nio.Buffer</semanticResources>
344 <semanticResources>java:/Objects/java.util.function.ToIntBiFunction</semanticResources>
345 <semanticResources>java:/Objects/jdk.internal.vm.annotation.DontInline</semanticResources>
346 <semanticResources>java:/Objects/java.lang.ArrayIndexOutOfBoundsException</semanticResources>
347 <semanticResources>java:/Objects/java.lang.ClassFormatError</semanticResources>
348 <semanticResources>java:/Objects/java.lang.LinkageError</semanticResources>
349 <semanticResources>java:/Objects/java.lang.Error</semanticResources>
350 <semanticResources>java:/Objects/java.nio.ByteBuffer</semanticResources>
351 <semanticResources>java:/Objects/java.nio.DoubleBuffer</semanticResources>
352 <semanticResources>java:/Objects/java.nio.ByteOrder</semanticResources>
353 <semanticResources>java:/Objects/java.util.function.ToLongBiFunction</semanticResources>
354 <semanticResources>java:/Objects/java.lang.invoke.MethodHandleNatives</semanticResources>
355 <semanticResources>java:/Objects/java.lang.NoSuchMethodError</semanticResources>
356 <semanticResources>java:/Objects/java.lang.IncompatibleClassChangeError</semanticResources>
357 <semanticResources>java:/Objects/java.lang.AssertionStatusDirectives</semanticResources>
358 <semanticResources>java:/Objects/java.util.concurrent.atomic.AtomicReference</semanticResources>
359 <semanticResources>java:/Objects/java.util.concurrent.locks.ReentrantLock</semanticResources>
360 <semanticResources>java:/Objects/java.util.concurrent.locks.Lock</semanticResources>
361 <semanticResources>java:/Objects/java.util.concurrent.locks.Condition</semanticResources>
362 <semanticResources>java:/Objects/java.util.concurrent.TimeUnit</semanticResources>
363 <semanticResources>java:/Objects/java.time.Duration</semanticResources>
364 <semanticResources>java:/Objects/java.time.temporal.TemporalAmount</semanticResources>
365 <semanticResources>java:/Objects/java.time.temporal.Temporal</semanticResources>
366 <semanticResources>java:/Objects/java.time.temporal.TemporalAccessor</semanticResources>
367 <semanticResources>java:/Objects/java.time.temporal.TemporalField</semanticResources>
368 <semanticResources>java:/Objects/java.time.temporal.TemporalUnit</semanticResources>
369 <semanticResources>java:/Objects/java.util.concurrent.RunnableFuture</semanticResources>
370 <semanticResources>java:/Objects/jdk.internal.perf.PerfCounter</semanticResources>
371 <semanticResources>java:/Objects/java.nio.LongBuffer</semanticResources>
372 <semanticResources>java:/Objects/java.net.ContentHandler</semanticResources>
373 <semanticResources>java:/Objects/java.util.concurrent.Callable</semanticResources>
374 <semanticResources>java:/Objects/jdk.internal.misc.JavaLangInvokeAccess</semanticResources>
375 <semanticResources>java:/Objects/java.util.HashMap</semanticResources>
376 <semanticResources>java:/Objects/java.util.LinkedHashMap</semanticResources>
377 <semanticResources>java:/Objects/jdk.internal.perf.Perf</semanticResources>
378 <semanticResources>java:/Objects/java.util.concurrent.TimeoutException</semanticResources>
379 <semanticResources>java:/Objects/java.util.Vector</semanticResources>
380 <semanticResources>java:/Objects/java.nio.FloatBuffer</semanticResources>
381 <semanticResources>java:/Objects/java.net.FileNameMap</semanticResources>
382 <semanticResources>java:/Objects/java.util.concurrent.ForkJoinPool</semanticResources>
383 <semanticResources>java:/Objects/java.util.concurrent.AbstractExecutorService</semanticResources>
384 <semanticResources>java:/Objects/java.util.concurrent.ExecutorService</semanticResources>
385 <semanticResources>java:/Objects/java.util.concurrent.Executor</semanticResources>
386 <semanticResources>java:/Objects/java.time.temporal.ChronoUnit</semanticResources>
387 <semanticResources>java:/Objects/java.nio.IntBuffer</semanticResources>
388 <semanticResources>java:/Objects/java.net.ContentHandlerFactory</semanticResources>
389 <semanticResources>java:/Objects/java.math.BigDecimal</semanticResources>
390 <semanticResources>java:/Objects/java.math.MathContext</semanticResources>
391 <semanticResources>java:/Objects/java.math.RoundingMode</semanticResources>
392 <semanticResources>java:/Objects/java.nio.ShortBuffer</semanticResources>
393 <semanticResources>java:/Objects/sun.net.www.MessageHeader</semanticResources>
394 <semanticResources>java:/Objects/java.util.regex.PatternSyntaxException</semanticResources>
395 <semanticResources>java:/Objects/java.security.Timestamp</semanticResources>
396 <semanticResources>java:/Objects/java.util.Date</semanticResources>
397 <semanticResources>java:/Objects/java.time.Instant</semanticResources>
398 <semanticResources>java:/Objects/java.time.temporal.TemporalAdjuster</semanticResources>
399 <semanticResources>java:/Objects/java.lang.Readable</semanticResources>
400 <semanticResources>java:/Objects/java.util.regex.IntHashSet</semanticResources>
401 <semanticResources>java:/Objects/java.time.temporal.TemporalQuery</semanticResources>
402 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Attribute</semanticResources>
403 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.ClassReader</semanticResources>
404 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.ClassVisitor</semanticResources>
405 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.FieldVisitor</semanticResources>
406 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.TypePath</semanticResources>
407 <semanticResources>java:/Objects/java.time.temporal.ValueRange</semanticResources>
408 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Handle</semanticResources>
409 <semanticResources>java:/Objects/java.time.format.ResolverStyle</semanticResources>
410 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Label</semanticResources>
411 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.MethodWriter</semanticResources>
412 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.ClassWriter</semanticResources>
413 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Item</semanticResources>
414 <semanticResources>java:/Objects/sun.util.locale.InternalLocaleBuilder</semanticResources>
415 <semanticResources>java:/Objects/sun.util.locale.LocaleSyntaxException</semanticResources>
416 <semanticResources>java:/Objects/sun.util.calendar.BaseCalendar</semanticResources>
417 <semanticResources>java:/Objects/sun.util.calendar.AbstractCalendar</semanticResources>
418 <semanticResources>java:/Objects/sun.util.calendar.CalendarSystem</semanticResources>
419 <semanticResources>java:/Objects/sun.util.calendar.CalendarDate</semanticResources>
420 <semanticResources>java:/Objects/java.util.TimeZone</semanticResources>
421 <semanticResources>java:/Objects/java.time.ZoneId</semanticResources>
422 <semanticResources>java:/Objects/java.time.format.TextStyle</semanticResources>
423 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.ByteVector</semanticResources>
424 <semanticResources>java:/Objects/sun.util.locale.LocaleObjectCache</semanticResources>
425 <semanticResources>java:/Objects/sun.util.locale.BaseLocale</semanticResources>
426 <semanticResources>java:/Objects/sun.util.locale.LocaleExtensions</semanticResources>
427 <semanticResources>java:/Objects/java.lang.Character</semanticResources>
428 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Context</semanticResources>
429 <semanticResources>java:/Objects/sun.util.locale.provider.LocaleServiceProviderPool</semanticResources>
430 <semanticResources>java:/Objects/java.util.spi.LocaleServiceProvider</semanticResources>
431 <semanticResources>java:/Objects/java.math.MutableBigInteger</semanticResources>
432 <semanticResources>java:/Objects/java.util.spi.LocaleNameProvider</semanticResources>
433 <semanticResources>java:/Objects/java.util.concurrent.ForkJoinWorkerThread</semanticResources>
434 <semanticResources>java:/Objects/java.util.ResourceBundle</semanticResources>
435 <semanticResources>java:/Objects/java.util.ServiceLoader</semanticResources>
436 <semanticResources>java:/Objects/jdk.internal.module.ServicesCatalog</semanticResources>
437 <semanticResources>java:/Objects/jdk.internal.loader.ClassLoaderValue</semanticResources>
438 <semanticResources>java:/Objects/jdk.internal.loader.AbstractClassLoaderValue</semanticResources>
439 <semanticResources>java:/Objects/java.lang.IllegalStateException</semanticResources>
440 <semanticResources>java:/Objects/java.util.Formatter</semanticResources>
441 <semanticResources>java:/Objects/java.util.Calendar</semanticResources>
442 <semanticResources>java:/Objects/java.text.DateFormatSymbols</semanticResources>
443 <semanticResources>java:/Objects/java.lang.RuntimePermission</semanticResources>
444 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.ModuleVisitor</semanticResources>
445 <semanticResources>java:/Objects/sun.util.locale.provider.LocaleResources</semanticResources>
446 <semanticResources>java:/Objects/sun.util.locale.provider.ResourceBundleBasedAdapter</semanticResources>
447 <semanticResources>java:/Objects/sun.util.resources.LocaleData</semanticResources>
448 <semanticResources>java:/Objects/java.util.spi.ResourceBundleProvider</semanticResources>
449 <semanticResources>java:/Objects/jdk.internal.vm.annotation.ReservedStackAccess</semanticResources>
450 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.AnnotationWriter</semanticResources>
451 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.FieldWriter</semanticResources>
452 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.ModuleWriter</semanticResources>
453 <semanticResources>java:/Objects/java.util.MissingResourceException</semanticResources>
454 <semanticResources>java:/Objects/java.io.BufferedWriter</semanticResources>
455 <semanticResources>java:/Objects/sun.util.locale.LanguageTag</semanticResources>
456 <semanticResources>java:/Objects/sun.util.locale.ParseStatus</semanticResources>
457 <semanticResources>java:/Objects/sun.util.locale.StringTokenIterator</semanticResources>
458 <semanticResources>java:/Objects/sun.util.locale.Extension</semanticResources>
459 <semanticResources>java:/Objects/java.util.SortedMap</semanticResources>
460 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Frame</semanticResources>
461 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Type</semanticResources>
462 <semanticResources>java:/Objects/sun.util.locale.provider.LocaleProviderAdapter</semanticResources>
463 <semanticResources>java:/Objects/sun.util.locale.provider.FallbackLocaleProviderAdapter</semanticResources>
464 <semanticResources>java:/Objects/sun.util.locale.provider.JRELocaleProviderAdapter</semanticResources>
465 <semanticResources>java:/Objects/java.text.spi.BreakIteratorProvider</semanticResources>
466 <semanticResources>java:/Objects/java.text.BreakIterator</semanticResources>
467 <semanticResources>java:/Objects/java.text.CharacterIterator</semanticResources>
468 <semanticResources>java:/Objects/sun.util.calendar.Era</semanticResources>
469 <semanticResources>java:/Objects/java.util.concurrent.locks.AbstractQueuedSynchronizer</semanticResources>
470 <semanticResources>java:/Objects/java.util.concurrent.locks.AbstractOwnableSynchronizer</semanticResources>
471 <semanticResources>java:/Objects/java.io.FilenameFilter</semanticResources>
472 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Handler</semanticResources>
473 <semanticResources>java:/Objects/sun.util.calendar.Gregorian</semanticResources>
474 <semanticResources>java:/Objects/java.time.ZoneOffset</semanticResources>
475 <semanticResources>java:/Objects/java.time.zone.ZoneRules</semanticResources>
476 <semanticResources>java:/Objects/java.time.zone.ZoneOffsetTransition</semanticResources>
477 <semanticResources>java:/Objects/java.time.LocalDateTime</semanticResources>
478 <semanticResources>java:/Objects/java.time.chrono.ChronoLocalDateTime</semanticResources>
479 <semanticResources>java:/Objects/java.time.chrono.ChronoZonedDateTime</semanticResources>
480 <semanticResources>java:/Objects/java.time.format.DateTimeFormatter</semanticResources>
481 <semanticResources>java:/Objects/java.text.Format</semanticResources>
482 <semanticResources>java:/Objects/java.text.AttributedCharacterIterator</semanticResources>
483 <semanticResources>java:/Objects/java.time.zone.ZoneOffsetTransitionRule</semanticResources>
484 <semanticResources>java:/Objects/java.time.Month</semanticResources>
485 <semanticResources>java:/Objects/jdk.internal.org.objectweb.asm.Edge</semanticResources>
486 <semanticResources>java:/Objects/java.time.DayOfWeek</semanticResources>
487 <semanticResources>java:/Objects/sun.invoke.empty.Empty</semanticResources>
488 <semanticResources>java:/Objects/java.time.LocalTime</semanticResources>
489 <semanticResources>java:/Objects/java.time.LocalDate</semanticResources>
490 <semanticResources>java:/Objects/java.time.chrono.ChronoLocalDate</semanticResources>
491 <semanticResources>java:/Objects/java.time.chrono.Chronology</semanticResources>
492 <semanticResources>java:/Objects/java.time.chrono.Era</semanticResources>
493 <semanticResources>java:/Objects/java.lang.InternalError</semanticResources>
494 <semanticResources>java:/Objects/java.lang.VirtualMachineError</semanticResources>
495 <semanticResources>java:/Objects/java.io.FileFilter</semanticResources>
496 <semanticResources>java:/Objects/java.lang.reflect.ParameterizedType</semanticResources>
497 <semanticResources>java:/Objects/java.time.OffsetTime</semanticResources>
498 <semanticResources>java:/Objects/java.time.OffsetDateTime</semanticResources>
499 <semanticResources>java:/Objects/java.time.ZonedDateTime</semanticResources>
500 <semanticResources>java:/Objects/java.time.Clock</semanticResources>
501 <semanticResources>java:/Objects/java.lang.reflect.WildcardType</semanticResources>
502 <semanticResources>java:/Objects/java.time.Period</semanticResources>
503 <semanticResources>java:/Objects/java.time.chrono.ChronoPeriod</semanticResources>
504 <semanticResources>java:/Objects/java.net.NetworkInterface</semanticResources>
505 <semanticResources>java:/Objects/java.net.SocketException</semanticResources>
506 <semanticResources>java:/Objects/java.util.spi.ResourceBundleControlProvider</semanticResources>
507 <semanticResources>java:/Objects/java.time.chrono.IsoChronology</semanticResources>
508 <semanticResources>java:/Objects/java.time.chrono.AbstractChronology</semanticResources>
509 <semanticResources>java:/Objects/java.time.temporal.ChronoField</semanticResources>
510 <semanticResources>java:/Objects/java.net.InetAddressImpl</semanticResources>
511 <semanticResources>java:/Objects/java.time.chrono.IsoEra</semanticResources>
512 <semanticResources>java:/Objects/java.util.NavigableSet</semanticResources>
513 <semanticResources>java:/Objects/java.util.SortedSet</semanticResources>
514 <semanticResources>java:/Objects/java.net.InterfaceAddress</semanticResources>
515 <semanticResources>java:/Objects/java.net.Inet4Address</semanticResources>
516 <semanticResources>java:/Objects/java.security.PublicKey</semanticResources>
517 <semanticResources>java:/Objects/java.security.Key</semanticResources>
518 <semanticResources>java:/Objects/java.text.FieldPosition</semanticResources>
519 <semanticResources>java:/Objects/java.text.ParseException</semanticResources>
520 <semanticResources>java:/Objects/java.util.ServiceConfigurationError</semanticResources>
521 <semanticResources>java:/Objects/java.nio.file.Path</semanticResources>
522 <semanticResources>java:/Objects/java.nio.file.Watchable</semanticResources>
523 <semanticResources>java:/Objects/java.nio.file.WatchService</semanticResources>
524 <semanticResources>java:/Objects/java.nio.file.WatchKey</semanticResources>
525 <semanticResources>java:/Objects/java.nio.file.WatchEvent</semanticResources>
526 <semanticResources>java:/Objects/java.text.ParsePosition</semanticResources>
527 <semanticResources>java:/Objects/java.time.format.DateTimeFormatterBuilder</semanticResources>
528 <semanticResources>java:/Objects/java.time.format.DateTimePrintContext</semanticResources>
529 <semanticResources>java:/Objects/java.time.format.DecimalStyle</semanticResources>
530 <semanticResources>java:/Objects/java.time.format.DateTimeParseException</semanticResources>
531 <semanticResources>java:/Objects/java.time.DateTimeException</semanticResources>
532 <semanticResources>java:/Objects/java.io.FileSystem</semanticResources>
533 <semanticResources>java:/Objects/java.time.format.FormatStyle</semanticResources>
534 <semanticResources>java:/Objects/java.security.NoSuchAlgorithmException</semanticResources>
535 <semanticResources>java:/Objects/java.security.SecureRandomSpi</semanticResources>
536 <semanticResources>java:/Objects/java.security.SecureRandomParameters</semanticResources>
537 <semanticResources>java:/Objects/java.time.format.DateTimeParseContext</semanticResources>
538 <semanticResources>java:/Objects/java.time.format.Parsed</semanticResources>
539 <semanticResources>java:/Objects/java.io.BufferedReader</semanticResources>
540 <semanticResources>java:/Objects/java.io.Reader</semanticResources>
541 <semanticResources>java:/Objects/java.time.format.SignStyle</semanticResources>
542 <semanticResources>java:/Objects/java.security.InvalidKeyException</semanticResources>
543 <semanticResources>java:/Objects/java.security.KeyException</semanticResources>
544 <semanticResources>java:/Objects/java.security.Provider</semanticResources>
545 <semanticResources>java:/Objects/java.util.Properties</semanticResources>
546 <semanticResources>java:/Objects/java.util.InvalidPropertiesFormatException</semanticResources>
547 <semanticResources>java:/Objects/java.io.NotSerializableException</semanticResources>
548 <semanticResources>java:/Objects/jdk.internal.misc.JavaLangAccess</semanticResources>
549 <semanticResources>java:/Objects/java.nio.charset.CharacterCodingException</semanticResources>
550 <semanticResources>java:/Objects/java.security.NoSuchProviderException</semanticResources>
551 <semanticResources>java:/Objects/java.lang.LayerInstantiationException</semanticResources>
552 <semanticResources>java:/Objects/java.security.MessageDigest</semanticResources>
553 <semanticResources>java:/Objects/java.security.MessageDigestSpi</semanticResources>
554 <semanticResources>java:/Objects/java.security.DigestException</semanticResources>
555 <semanticResources>java:/Objects/java.time.format.DateTimeTextProvider</semanticResources>
556 <semanticResources>java:/Objects/sun.security.util.MessageDigestSpi2</semanticResources>
557 <semanticResources>java:/Objects/javax.crypto.SecretKey</semanticResources>
558 <semanticResources>java:/Objects/javax.security.auth.Destroyable</semanticResources>
559 <semanticResources>java:/Objects/javax.security.auth.DestroyFailedException</semanticResources>
560 <semanticResources>java:/Objects/jdk.internal.module.ModuleTarget</semanticResources>
561 <semanticResources>java:/Objects/java.nio.file.FileSystem</semanticResources>
562 <semanticResources>java:/Objects/java.nio.file.FileStore</semanticResources>
563 <semanticResources>java:/Objects/java.nio.file.attribute.FileStoreAttributeView</semanticResources>
564 <semanticResources>java:/Objects/java.nio.file.attribute.AttributeView</semanticResources>
565 <semanticResources>java:/Objects/java.nio.file.LinkOption</semanticResources>
566 <semanticResources>java:/Objects/java.nio.file.OpenOption</semanticResources>
567 <semanticResources>java:/Objects/java.nio.file.PathMatcher</semanticResources>
568 <semanticResources>java:/Objects/java.security.SignatureException</semanticResources>
569 <semanticResources>java:/Objects/java.nio.file.attribute.UserPrincipalLookupService</semanticResources>
570 <semanticResources>java:/Objects/java.nio.file.attribute.GroupPrincipal</semanticResources>
571 <semanticResources>java:/Objects/java.nio.file.attribute.UserPrincipal</semanticResources>
572 <semanticResources>java:/Objects/java.nio.file.spi.FileSystemProvider</semanticResources>
573 <semanticResources>java:/Objects/java.nio.file.AccessMode</semanticResources>
574 <semanticResources>java:/Objects/java.nio.charset.CharsetDecoder</semanticResources>
575 <semanticResources>java:/Objects/java.nio.charset.CoderResult</semanticResources>
576 <semanticResources>java:/Objects/java.nio.file.attribute.FileAttributeView</semanticResources>
577 <semanticResources>java:/Objects/java.util.LinkedList</semanticResources>
578 <semanticResources>java:/Objects/java.util.AbstractSequentialList</semanticResources>
579 <semanticResources>java:/Objects/sun.util.resources.Bundles</semanticResources>
580 <semanticResources>java:/Objects/jdk.internal.misc.JavaUtilResourceBundleAccess</semanticResources>
581 <semanticResources>java:/Objects/java.util.EnumSet</semanticResources>
582 <semanticResources>java:/Objects/java.security.cert.CRL</semanticResources>
583 <semanticResources>java:/Objects/java.security.PrivilegedExceptionAction</semanticResources>
584 <semanticResources>java:/Objects/java.security.PrivilegedActionException</semanticResources>
585 <semanticResources>java:/Objects/java.lang.module.ModuleReader</semanticResources>
586 <semanticResources>java:/Objects/java.nio.file.CopyOption</semanticResources>
587 <semanticResources>java:/Objects/java.nio.file.attribute.FileAttribute</semanticResources>
588 <semanticResources>java:/Objects/java.nio.channels.AsynchronousFileChannel</semanticResources>
589 <semanticResources>java:/Objects/java.nio.channels.AsynchronousChannel</semanticResources>
590 <semanticResources>java:/Objects/java.nio.channels.Channel</semanticResources>
591 <semanticResources>java:/Objects/java.nio.channels.SeekableByteChannel</semanticResources>
592 <semanticResources>java:/Objects/java.nio.channels.ByteChannel</semanticResources>
593 <semanticResources>java:/Objects/java.nio.channels.ReadableByteChannel</semanticResources>
594 <semanticResources>java:/Objects/java.nio.file.DirectoryStream</semanticResources>
595 <semanticResources>java:/Objects/sun.util.resources.OpenListResourceBundle</semanticResources>
596 <semanticResources>java:/Objects/java.nio.channels.FileChannel</semanticResources>
597 <semanticResources>java:/Objects/java.nio.channels.spi.AbstractInterruptibleChannel</semanticResources>
598 <semanticResources>java:/Objects/java.nio.channels.InterruptibleChannel</semanticResources>
599 <semanticResources>java:/Objects/java.nio.file.attribute.BasicFileAttributes</semanticResources>
600 <semanticResources>java:/Objects/java.nio.file.attribute.FileTime</semanticResources>
601 <semanticResources>java:/Objects/java.nio.channels.FileLock</semanticResources>
602 <semanticResources>java:/Objects/java.nio.channels.WritableByteChannel</semanticResources>
603 <semanticResources>java:/Objects/java.nio.channels.CompletionHandler</semanticResources>
604 <semanticResources>java:/Objects/java.nio.channels.GatheringByteChannel</semanticResources>
605 <semanticResources>java:/Objects/java.nio.channels.ScatteringByteChannel</semanticResources>
606 <semanticResources>java:/Objects/java.nio.MappedByteBuffer</semanticResources>
607 <semanticResources>java:/Objects/sun.util.resources.TimeZoneNamesBundle</semanticResources>
608 <semanticResources>java:/Objects/java.nio.channels.AsynchronousCloseException</semanticResources>
609 <semanticResources>java:/Objects/java.nio.channels.ClosedChannelException</semanticResources>
610 <semanticResources>java:/Objects/sun.nio.cs.StreamEncoder</semanticResources>
611 <semanticResources>java:/Objects/sun.util.resources.ParallelListResourceBundle</semanticResources>
612 <semanticResources>java:/Objects/java.util.concurrent.atomic.AtomicMarkableReference</semanticResources>
613 <semanticResources>java:/Objects/java.nio.charset.CodingErrorAction</semanticResources>
614 <semanticResources>java:/Objects/java.util.spi.CalendarDataProvider</semanticResources>
615 <semanticResources>java:/Objects/java.io.Console</semanticResources>
616 <semanticResources>java:/Objects/java.util.spi.CalendarNameProvider</semanticResources>
617 <semanticResources>java:/Objects/java.io.FileOutputStream</semanticResources>
618 <semanticResources>java:/Objects/jdk.internal.misc.JavaIOFileDescriptorAccess</semanticResources>
619 <semanticResources>java:/Objects/sun.util.spi.CalendarProvider</semanticResources>
620 <semanticResources>java:/Objects/java.text.spi.CollatorProvider</semanticResources>
621 <semanticResources>java:/Objects/java.text.Collator</semanticResources>
622 <semanticResources>java:/Objects/java.text.CollationKey</semanticResources>
623 <semanticResources>java:/Objects/java.util.spi.CurrencyNameProvider</semanticResources>
624 <semanticResources>java:/Objects/java.text.spi.DateFormatProvider</semanticResources>
625 <semanticResources>java:/Objects/java.text.DateFormat</semanticResources>
626 <semanticResources>java:/Objects/java.text.NumberFormat</semanticResources>
627 <semanticResources>java:/Objects/java.util.Currency</semanticResources>
628 <semanticResources>java:/Objects/java.util.HashSet</semanticResources>
629 <semanticResources>java:/Objects/java.text.spi.DateFormatSymbolsProvider</semanticResources>
630 <semanticResources>java:/Objects/java.text.spi.DecimalFormatSymbolsProvider</semanticResources>
631 <semanticResources>java:/Objects/java.text.DecimalFormatSymbols</semanticResources>
632 <semanticResources>java:/Objects/sun.text.spi.JavaTimeDateTimePatternProvider</semanticResources>
633 <semanticResources>java:/Objects/java.text.spi.NumberFormatProvider</semanticResources>
634 <semanticResources>java:/Objects/java.util.spi.TimeZoneNameProvider</semanticResources>
635 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.IPatternMatch</semanticResources>
636 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.IQuerySpecification</semanticResources>
637 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQueryHeader</semanticResources>
638 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation</semanticResources>
639 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter</semanticResources>
640 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IInputKey</semanticResources>
641 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection</semanticResources>
642 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility</semanticResources>
643 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery</semanticResources>
644 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PTraceable</semanticResources>
645 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PDisjunction</semanticResources>
646 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PBody</semanticResources>
647 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PVariable</semanticResources>
648 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint</semanticResources>
649 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryMetaContext</semanticResources>
650 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.InputKeyImplication</semanticResources>
651 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IPosetComparator</semanticResources>
652 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.Tuple</semanticResources>
653 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.AbstractTuple</semanticResources>
654 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.ITuple</semanticResources>
655 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.TypeJudgement</semanticResources>
656 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter</semanticResources>
657 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint</semanticResources>
658 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.DeferredPConstraint</semanticResources>
659 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint</semanticResources>
660 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint</semanticResources>
661 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.QueryHintOption</semanticResources>
662 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory</semanticResources>
663 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IMatcherCapability</semanticResources>
664 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryBackendContext</semanticResources>
665 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendHintProvider</semanticResources>
666 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PProblem</semanticResources>
667 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.planning.QueryProcessingException</semanticResources>
668 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.ViatraQueryRuntimeException</semanticResources>
669 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.planning.SubPlan</semanticResources>
670 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.planning.operations.POperation</semanticResources>
671 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackend</semanticResources>
672 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryResultProvider</semanticResources>
673 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IUpdateable</semanticResources>
674 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask</semanticResources>
675 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.IModifiableTuple</semanticResources>
676 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.util.Accuracy</semanticResources>
677 <semanticResources>java:/Objects/org.apache.log4j.Logger</semanticResources>
678 <semanticResources>java:/Objects/org.apache.log4j.Category</semanticResources>
679 <semanticResources>java:/Objects/org.apache.log4j.spi.AppenderAttachable</semanticResources>
680 <semanticResources>java:/Objects/org.apache.log4j.Appender</semanticResources>
681 <semanticResources>java:/Objects/org.apache.log4j.spi.Filter</semanticResources>
682 <semanticResources>java:/Objects/org.apache.log4j.spi.OptionHandler</semanticResources>
683 <semanticResources>java:/Objects/org.apache.log4j.spi.LoggingEvent</semanticResources>
684 <semanticResources>java:/Objects/org.apache.log4j.Priority</semanticResources>
685 <semanticResources>java:/Objects/org.apache.log4j.Level</semanticResources>
686 <semanticResources>java:/Objects/org.apache.log4j.spi.ThrowableInformation</semanticResources>
687 <semanticResources>java:/Objects/org.apache.log4j.spi.LocationInfo</semanticResources>
688 <semanticResources>java:/Objects/java.io.StringWriter</semanticResources>
689 <semanticResources>java:/Objects/org.apache.log4j.spi.LoggerRepository</semanticResources>
690 <semanticResources>java:/Objects/org.apache.log4j.spi.HierarchyEventListener</semanticResources>
691 <semanticResources>java:/Objects/org.apache.log4j.helpers.AppenderAttachableImpl</semanticResources>
692 <semanticResources>java:/Objects/org.apache.log4j.spi.ErrorHandler</semanticResources>
693 <semanticResources>java:/Objects/org.apache.log4j.spi.LoggerFactory</semanticResources>
694 <semanticResources>java:/Objects/org.apache.log4j.Layout</semanticResources>
695 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.analysis.QueryAnalyzer</semanticResources>
696 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryCacheContext</semanticResources>
697 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryResultProviderAccess</semanticResources>
698 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext</semanticResources>
699 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContextListener</semanticResources>
700 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IndexingService</semanticResources>
701 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryEngine</semanticResources>
702 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IBaseIndex</semanticResources>
703 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.scope.ViatraBaseIndexChangeListener</semanticResources>
704 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener</semanticResources>
705 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IInstanceObserver</semanticResources>
706 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher</semanticResources>
707 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.scope.QueryScope</semanticResources>
708 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.internal.apiimpl.EngineContextFactory</semanticResources>
709 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IEngineContext</semanticResources>
710 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions</semanticResources>
711 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseMatcher</semanticResources>
712 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.internal.apiimpl.QueryResultWrapper</semanticResources>
713 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification</semanticResources>
714 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification</semanticResources>
715 <semanticResources>java:/Objects/java.lang.ExceptionInInitializerError</semanticResources>
716 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.exception.ViatraQueryException</semanticResources>
717 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException</semanticResources>
718 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup</semanticResources>
719 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseQueryGroup</semanticResources>
720 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.IQueryGroup</semanticResources>
721 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine</semanticResources>
722 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryEngineLifecycleListener</semanticResources>
723 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.IMatchUpdateListener</semanticResources>
724 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryModelUpdateListener</semanticResources>
725 <semanticResources>java:/Objects/java.lang.Override</semanticResources>
726 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery</semanticResources>
727 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.BasePQuery</semanticResources>
728 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EClassifier</semanticResources>
729 <semanticResources>java:/Objects/org.eclipse.emf.ecore.ENamedElement</semanticResources>
730 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EModelElement</semanticResources>
731 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EObject</semanticResources>
732 <semanticResources>java:/Objects/org.eclipse.emf.common.notify.Notifier</semanticResources>
733 <semanticResources>java:/Objects/org.eclipse.emf.common.util.EList</semanticResources>
734 <semanticResources>java:/Objects/org.eclipse.emf.common.notify.Adapter</semanticResources>
735 <semanticResources>java:/Objects/org.eclipse.emf.common.notify.Notification</semanticResources>
736 <semanticResources>java:/Objects/org.eclipse.emf.common.util.TreeIterator</semanticResources>
737 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EClass</semanticResources>
738 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EAttribute</semanticResources>
739 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EStructuralFeature</semanticResources>
740 <semanticResources>java:/Objects/org.eclipse.emf.ecore.ETypedElement</semanticResources>
741 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EGenericType</semanticResources>
742 <semanticResources>java:/Objects/org.eclipse.emf.ecore.ETypeParameter</semanticResources>
743 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EAnnotation</semanticResources>
744 <semanticResources>java:/Objects/org.eclipse.emf.common.util.EMap</semanticResources>
745 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EReference</semanticResources>
746 <semanticResources>java:/Objects/org.eclipse.emf.ecore.InternalEObject</semanticResources>
747 <semanticResources>java:/Objects/org.eclipse.emf.common.notify.NotificationChain</semanticResources>
748 <semanticResources>java:/Objects/org.eclipse.emf.ecore.resource.Resource</semanticResources>
749 <semanticResources>java:/Objects/org.eclipse.emf.common.util.URI</semanticResources>
750 <semanticResources>java:/Objects/org.eclipse.emf.common.util.Pool</semanticResources>
751 <semanticResources>java:/Objects/org.eclipse.emf.common.util.WeakInterningHashSet</semanticResources>
752 <semanticResources>java:/Objects/org.eclipse.emf.common.util.InterningSet</semanticResources>
753 <semanticResources>java:/Objects/java.util.concurrent.locks.ReentrantReadWriteLock</semanticResources>
754 <semanticResources>java:/Objects/java.util.concurrent.locks.ReadWriteLock</semanticResources>
755 <semanticResources>java:/Objects/java.lang.IllegalMonitorStateException</semanticResources>
756 <semanticResources>java:/Objects/org.eclipse.emf.common.util.SegmentSequence</semanticResources>
757 <semanticResources>java:/Objects/org.eclipse.emf.common.util.CommonUtil</semanticResources>
758 <semanticResources>java:/Objects/org.eclipse.emf.ecore.resource.ResourceSet</semanticResources>
759 <semanticResources>java:/Objects/org.eclipse.emf.common.notify.AdapterFactory</semanticResources>
760 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EPackage</semanticResources>
761 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EFactory</semanticResources>
762 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EDataType</semanticResources>
763 <semanticResources>java:/Objects/org.eclipse.emf.common.CommonPlugin</semanticResources>
764 <semanticResources>java:/Objects/org.eclipse.emf.common.EMFPlugin</semanticResources>
765 <semanticResources>java:/Objects/org.eclipse.emf.common.util.DelegatingResourceLocator</semanticResources>
766 <semanticResources>java:/Objects/org.eclipse.emf.common.util.ResourceLocator</semanticResources>
767 <semanticResources>java:/Objects/org.eclipse.emf.common.util.Logger</semanticResources>
768 <semanticResources>java:/Objects/org.eclipse.core.runtime.Plugin</semanticResources>
769 <semanticResources>java:/Objects/org.osgi.framework.BundleActivator</semanticResources>
770 <semanticResources>java:/Objects/org.osgi.framework.BundleContext</semanticResources>
771 <semanticResources>java:/Objects/org.osgi.framework.BundleReference</semanticResources>
772 <semanticResources>java:/Objects/org.osgi.framework.Bundle</semanticResources>
773 <semanticResources>java:/Objects/org.osgi.framework.ServiceReference</semanticResources>
774 <semanticResources>java:/Objects/java.security.cert.X509Certificate</semanticResources>
775 <semanticResources>java:/Objects/java.security.cert.X509Extension</semanticResources>
776 <semanticResources>java:/Objects/java.security.cert.CertificateExpiredException</semanticResources>
777 <semanticResources>java:/Objects/java.security.cert.CertificateNotYetValidException</semanticResources>
778 <semanticResources>java:/Objects/java.security.cert.CertificateParsingException</semanticResources>
779 <semanticResources>java:/Objects/javax.security.auth.x500.X500Principal</semanticResources>
780 <semanticResources>java:/Objects/sun.security.x509.X500Name</semanticResources>
781 <semanticResources>java:/Objects/sun.security.x509.GeneralNameInterface</semanticResources>
782 <semanticResources>java:/Objects/sun.security.util.DerOutputStream</semanticResources>
783 <semanticResources>java:/Objects/java.io.ByteArrayOutputStream</semanticResources>
784 <semanticResources>java:/Objects/sun.security.util.DerEncoder</semanticResources>
785 <semanticResources>java:/Objects/sun.security.util.DerValue</semanticResources>
786 <semanticResources>java:/Objects/sun.security.util.DerInputBuffer</semanticResources>
787 <semanticResources>java:/Objects/java.io.ByteArrayInputStream</semanticResources>
788 <semanticResources>java:/Objects/sun.security.util.BitArray</semanticResources>
789 <semanticResources>java:/Objects/sun.security.util.DerInputStream</semanticResources>
790 <semanticResources>java:/Objects/sun.security.util.ObjectIdentifier</semanticResources>
791 <semanticResources>java:/Objects/sun.security.util.ByteArrayLexOrder</semanticResources>
792 <semanticResources>java:/Objects/sun.security.util.ByteArrayTagOrder</semanticResources>
793 <semanticResources>java:/Objects/sun.security.x509.RDN</semanticResources>
794 <semanticResources>java:/Objects/sun.security.x509.AVA</semanticResources>
795 <semanticResources>java:/Objects/java.lang.Byte</semanticResources>
796 <semanticResources>java:/Objects/org.osgi.framework.Version</semanticResources>
797 <semanticResources>java:/Objects/org.osgi.framework.BundleException</semanticResources>
798 <semanticResources>java:/Objects/org.osgi.framework.BundleListener</semanticResources>
799 <semanticResources>java:/Objects/java.util.EventListener</semanticResources>
800 <semanticResources>java:/Objects/org.osgi.framework.BundleEvent</semanticResources>
801 <semanticResources>java:/Objects/java.util.EventObject</semanticResources>
802 <semanticResources>java:/Objects/org.osgi.framework.FrameworkListener</semanticResources>
803 <semanticResources>java:/Objects/org.osgi.framework.FrameworkEvent</semanticResources>
804 <semanticResources>java:/Objects/org.osgi.framework.ServiceListener</semanticResources>
805 <semanticResources>java:/Objects/org.osgi.framework.ServiceEvent</semanticResources>
806 <semanticResources>java:/Objects/org.osgi.framework.InvalidSyntaxException</semanticResources>
807 <semanticResources>java:/Objects/org.osgi.framework.Filter</semanticResources>
808 <semanticResources>java:/Objects/org.osgi.framework.ServiceObjects</semanticResources>
809 <semanticResources>java:/Objects/org.osgi.framework.ServiceRegistration</semanticResources>
810 <semanticResources>java:/Objects/org.osgi.framework.ServiceFactory</semanticResources>
811 <semanticResources>java:/Objects/org.eclipse.core.runtime.IPath</semanticResources>
812 <semanticResources>java:/Objects/org.eclipse.osgi.service.debug.DebugOptions</semanticResources>
813 <semanticResources>java:/Objects/org.eclipse.osgi.service.debug.DebugTrace</semanticResources>
814 <semanticResources>java:/Objects/org.eclipse.core.runtime.ILog</semanticResources>
815 <semanticResources>java:/Objects/org.eclipse.core.runtime.ILogListener</semanticResources>
816 <semanticResources>java:/Objects/org.eclipse.core.runtime.IStatus</semanticResources>
817 <semanticResources>java:/Objects/org.eclipse.core.runtime.Preferences</semanticResources>
818 <semanticResources>java:/Objects/org.eclipse.core.runtime.CoreException</semanticResources>
819 <semanticResources>java:/Objects/org.eclipse.core.runtime.ListenerList</semanticResources>
820 <semanticResources>java:/Objects/org.osgi.util.tracker.ServiceTracker</semanticResources>
821 <semanticResources>java:/Objects/org.osgi.util.tracker.ServiceTrackerCustomizer</semanticResources>
822 <semanticResources>java:/Objects/org.osgi.framework.AllServiceListener</semanticResources>
823 <semanticResources>java:/Objects/org.osgi.util.tracker.AbstractTracked</semanticResources>
824 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EOperation</semanticResources>
825 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EParameter</semanticResources>
826 <semanticResources>java:/Objects/org.eclipse.emf.ecore.util.FeatureMap</semanticResources>
827 <semanticResources>java:/Objects/org.eclipse.emf.ecore.util.InternalEList</semanticResources>
828 <semanticResources>java:/Objects/org.eclipse.emf.ecore.util.EContentsEList</semanticResources>
829 <semanticResources>java:/Objects/org.eclipse.emf.ecore.util.AbstractSequentialInternalEList</semanticResources>
830 <semanticResources>java:/Objects/org.eclipse.emf.ecore.resource.URIConverter</semanticResources>
831 <semanticResources>java:/Objects/java.io.InputStreamReader</semanticResources>
832 <semanticResources>java:/Objects/sun.nio.cs.StreamDecoder</semanticResources>
833 <semanticResources>java:/Objects/java.io.FileInputStream</semanticResources>
834 <semanticResources>java:/Objects/org.eclipse.emf.ecore.resource.ContentHandler</semanticResources>
835 <semanticResources>java:/Objects/org.eclipse.emf.ecore.resource.URIHandler</semanticResources>
836 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EEnumLiteral</semanticResources>
837 <semanticResources>java:/Objects/org.eclipse.emf.common.util.Enumerator</semanticResources>
838 <semanticResources>java:/Objects/org.eclipse.emf.ecore.EEnum</semanticResources>
839 <semanticResources>java:/Objects/modes3.Segment</semanticResources>
840 <semanticResources>java:/Objects/modes3.Train</semanticResources>
841 <semanticResources>java:/Objects/java.lang.SuppressWarnings</semanticResources>
842 <semanticResources>java:/Objects/modes3.Turnout</semanticResources>
843 <semanticResources>../src/modes3/run/Modes3ModelGenerator.xtend</semanticResources>
844 <semanticResources>java:/Objects/org.eclipse.xtend.lib.annotations.FinalFieldsConstructor</semanticResources>
845 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.Active</semanticResources>
846 <semanticResources>java:/Objects/com.google.common.annotations.Beta</semanticResources>
847 <semanticResources>java:/Objects/com.google.common.annotations.GwtCompatible</semanticResources>
848 <semanticResources>java:/Objects/org.eclipse.xtend.lib.annotations.FinalFieldsConstructorProcessor</semanticResources>
849 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.TransformationParticipant</semanticResources>
850 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.Extension</semanticResources>
851 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.TransformationContext</semanticResources>
852 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.Tracability</semanticResources>
853 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.Element</semanticResources>
854 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.ProblemSupport</semanticResources>
855 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.Problem</semanticResources>
856 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.Procedures</semanticResources>
857 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.TypeReferenceProvider</semanticResources>
858 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.TypeReference</semanticResources>
859 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ResolvedMethod</semanticResources>
860 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ResolvedExecutable</semanticResources>
861 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ExecutableDeclaration</semanticResources>
862 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.TypeParameterDeclarator</semanticResources>
863 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MemberDeclaration</semanticResources>
864 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.Declaration</semanticResources>
865 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.AnnotationTarget</semanticResources>
866 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.NamedElement</semanticResources>
867 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.CompilationUnit</semanticResources>
868 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.file.Path</semanticResources>
869 <semanticResources>java:/Objects/com.google.common.collect.ImmutableList</semanticResources>
870 <semanticResources>java:/Objects/com.google.common.collect.ImmutableCollection</semanticResources>
871 <semanticResources>java:/Objects/com.google.common.collect.UnmodifiableIterator</semanticResources>
872 <semanticResources>java:/Objects/com.google.common.annotations.VisibleForTesting</semanticResources>
873 <semanticResources>java:/Objects/com.google.common.collect.UnmodifiableListIterator</semanticResources>
874 <semanticResources>java:/Objects/com.google.common.base.Splitter</semanticResources>
875 <semanticResources>java:/Objects/com.google.common.base.AbstractIterator</semanticResources>
876 <semanticResources>java:/Objects/com.google.common.base.CharMatcher</semanticResources>
877 <semanticResources>java:/Objects/com.google.common.base.Predicate</semanticResources>
878 <semanticResources>java:/Objects/com.google.common.annotations.GwtIncompatible</semanticResources>
879 <semanticResources>java:/Objects/java.util.BitSet</semanticResources>
880 <semanticResources>java:/Objects/com.google.common.base.CommonPattern</semanticResources>
881 <semanticResources>java:/Objects/com.google.common.base.CommonMatcher</semanticResources>
882 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.TypeDeclaration</semanticResources>
883 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.Type</semanticResources>
884 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.AnnotationReference</semanticResources>
885 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.AnnotationTypeDeclaration</semanticResources>
886 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.AnnotationTypeElementDeclaration</semanticResources>
887 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.expression.Expression</semanticResources>
888 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.Modifier</semanticResources>
889 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.Visibility</semanticResources>
890 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.EnumerationValueDeclaration</semanticResources>
891 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.EnumerationTypeDeclaration</semanticResources>
892 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ConstructorDeclaration</semanticResources>
893 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration</semanticResources>
894 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.FieldDeclaration</semanticResources>
895 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MethodDeclaration</semanticResources>
896 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.TypeParameterDeclaration</semanticResources>
897 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ClassDeclaration</semanticResources>
898 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.InterfaceDeclaration</semanticResources>
899 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ResolvedConstructor</semanticResources>
900 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ResolvedParameter</semanticResources>
901 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.ResolvedTypeParameter</semanticResources>
902 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.TypeLookup</semanticResources>
903 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.GlobalTypeLookup</semanticResources>
904 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableAnnotationTypeDeclaration</semanticResources>
905 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableTypeDeclaration</semanticResources>
906 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableMemberDeclaration</semanticResources>
907 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableDeclaration</semanticResources>
908 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableAnnotationTarget</semanticResources>
909 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableNamedElement</semanticResources>
910 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableElement</semanticResources>
911 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableConstructorDeclaration</semanticResources>
912 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableExecutableDeclaration</semanticResources>
913 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableTypeParameterDeclarator</semanticResources>
914 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableTypeParameterDeclaration</semanticResources>
915 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableFieldDeclaration</semanticResources>
916 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.CompilationStrategy</semanticResources>
917 <semanticResources>java:/Objects/org.eclipse.xtend2.lib.StringConcatenationClient</semanticResources>
918 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableMethodDeclaration</semanticResources>
919 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableParameterDeclaration</semanticResources>
920 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableClassDeclaration</semanticResources>
921 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableEnumerationTypeDeclaration</semanticResources>
922 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableEnumerationValueDeclaration</semanticResources>
923 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableInterfaceDeclaration</semanticResources>
924 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.declaration.MutableAnnotationTypeElementDeclaration</semanticResources>
925 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.file.FileSystemSupport</semanticResources>
926 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.file.FileLocations</semanticResources>
927 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.AnnotationReferenceProvider</semanticResources>
928 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.AnnotationReferenceBuildContext</semanticResources>
929 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.Associator</semanticResources>
930 <semanticResources>java:/Objects/org.eclipse.xtend.lib.annotations.Data</semanticResources>
931 <semanticResources>java:/Objects/org.eclipse.xtend.lib.annotations.DataProcessor</semanticResources>
932 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.AbstractClassProcessor</semanticResources>
933 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.RegisterGlobalsParticipant</semanticResources>
934 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.RegisterGlobalsContext</semanticResources>
935 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.UpstreamTypeLookup</semanticResources>
936 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.services.SourceTypeLookup</semanticResources>
937 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.CodeGenerationParticipant</semanticResources>
938 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.CodeGenerationContext</semanticResources>
939 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.file.MutableFileSystemSupport</semanticResources>
940 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.ValidationParticipant</semanticResources>
941 <semanticResources>java:/Objects/org.eclipse.xtend.lib.macro.ValidationContext</semanticResources>
942 <semanticResources>java:/Objects/org.eclipse.xtend.lib.annotations.Accessors</semanticResources>
943 <semanticResources>java:/Objects/org.eclipse.xtend.lib.annotations.AccessorsProcessor</semanticResources>
944 <semanticResources>java:/Objects/org.eclipse.xtend.lib.annotations.AccessorType</semanticResources>
945 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ArrayLiterals</semanticResources>
946 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.Pure</semanticResources>
947 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.Inline</semanticResources>
948 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.CollectionLiterals</semanticResources>
949 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.Pair</semanticResources>
950 <semanticResources>java:/Objects/java.util.LinkedHashSet</semanticResources>
951 <semanticResources>java:/Objects/java.util.TreeMap</semanticResources>
952 <semanticResources>java:/Objects/java.util.NavigableMap</semanticResources>
953 <semanticResources>java:/Objects/java.util.TreeSet</semanticResources>
954 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.InputOutput</semanticResources>
955 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ArrayExtensions</semanticResources>
956 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.BigDecimalExtensions</semanticResources>
957 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.BigIntegerExtensions</semanticResources>
958 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.BooleanExtensions</semanticResources>
959 <semanticResources>java:/Objects/com.google.common.primitives.Booleans</semanticResources>
960 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ByteExtensions</semanticResources>
961 <semanticResources>java:/Objects/java.lang.Math</semanticResources>
962 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.CharacterExtensions</semanticResources>
963 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.CollectionExtensions</semanticResources>
964 <semanticResources>java:/Objects/com.google.common.collect.Iterables</semanticResources>
965 <semanticResources>java:/Objects/com.google.common.collect.FluentIterable</semanticResources>
966 <semanticResources>java:/Objects/com.google.common.base.Function</semanticResources>
967 <semanticResources>java:/Objects/com.google.common.base.Optional</semanticResources>
968 <semanticResources>java:/Objects/com.google.common.base.Supplier</semanticResources>
969 <semanticResources>java:/Objects/com.google.common.collect.ImmutableListMultimap</semanticResources>
970 <semanticResources>java:/Objects/com.google.common.collect.ImmutableMultimap</semanticResources>
971 <semanticResources>java:/Objects/com.google.common.collect.BaseImmutableMultimap</semanticResources>
972 <semanticResources>java:/Objects/com.google.common.collect.AbstractMultimap</semanticResources>
973 <semanticResources>java:/Objects/com.google.common.collect.Multimap</semanticResources>
974 <semanticResources>java:/Objects/com.google.common.collect.Multiset</semanticResources>
975 <semanticResources>java:/Objects/com.google.common.collect.Multimaps</semanticResources>
976 <semanticResources>java:/Objects/com.google.common.collect.Maps</semanticResources>
977 <semanticResources>java:/Objects/com.google.common.collect.ImmutableMap</semanticResources>
978 <semanticResources>java:/Objects/com.google.common.collect.ImmutableSet</semanticResources>
979 <semanticResources>java:/Objects/com.google.common.collect.ImmutableSetMultimap</semanticResources>
980 <semanticResources>java:/Objects/com.google.common.collect.SetMultimap</semanticResources>
981 <semanticResources>java:/Objects/com.google.common.collect.Serialization</semanticResources>
982 <semanticResources>java:/Objects/com.google.common.collect.ImmutableMultiset</semanticResources>
983 <semanticResources>java:/Objects/com.google.common.collect.ImmutableMultisetGwtSerializationDependencies</semanticResources>
984 <semanticResources>java:/Objects/com.google.common.collect.IndexedImmutableSet</semanticResources>
985 <semanticResources>java:/Objects/com.google.common.collect.AbstractListMultimap</semanticResources>
986 <semanticResources>java:/Objects/com.google.common.collect.AbstractMapBasedMultimap</semanticResources>
987 <semanticResources>java:/Objects/com.google.common.collect.AbstractSetMultimap</semanticResources>
988 <semanticResources>java:/Objects/com.google.common.collect.AbstractSortedSetMultimap</semanticResources>
989 <semanticResources>java:/Objects/com.google.common.collect.SortedSetMultimap</semanticResources>
990 <semanticResources>java:/Objects/com.google.common.collect.AbstractMultiset</semanticResources>
991 <semanticResources>java:/Objects/com.google.common.collect.Multisets</semanticResources>
992 <semanticResources>java:/Objects/com.google.common.collect.Sets</semanticResources>
993 <semanticResources>java:/Objects/com.google.common.collect.ForwardingCollection</semanticResources>
994 <semanticResources>java:/Objects/com.google.common.collect.ForwardingObject</semanticResources>
995 <semanticResources>java:/Objects/com.google.common.collect.CartesianList</semanticResources>
996 <semanticResources>java:/Objects/com.google.common.collect.ForwardingNavigableSet</semanticResources>
997 <semanticResources>java:/Objects/com.google.common.collect.ForwardingSortedSet</semanticResources>
998 <semanticResources>java:/Objects/com.google.common.collect.ForwardingSet</semanticResources>
999 <semanticResources>java:/Objects/com.google.common.collect.Ordering</semanticResources>
1000 <semanticResources>java:/Objects/com.google.common.collect.Collections2</semanticResources>
1001 <semanticResources>java:/Objects/com.google.common.collect.AbstractIterator</semanticResources>
1002 <semanticResources>java:/Objects/java.util.concurrent.CopyOnWriteArraySet</semanticResources>
1003 <semanticResources>java:/Objects/java.util.concurrent.CopyOnWriteArrayList</semanticResources>
1004 <semanticResources>java:/Objects/com.google.common.collect.Range</semanticResources>
1005 <semanticResources>java:/Objects/com.google.common.collect.RangeGwtSerializationDependencies</semanticResources>
1006 <semanticResources>java:/Objects/com.google.common.collect.Cut</semanticResources>
1007 <semanticResources>java:/Objects/com.google.common.collect.DiscreteDomain</semanticResources>
1008 <semanticResources>java:/Objects/com.google.common.collect.BoundType</semanticResources>
1009 <semanticResources>java:/Objects/java.util.EnumMap</semanticResources>
1010 <semanticResources>java:/Objects/com.google.common.collect.ListMultimap</semanticResources>
1011 <semanticResources>java:/Objects/com.google.common.collect.ForwardingMultimap</semanticResources>
1012 <semanticResources>java:/Objects/com.google.common.collect.FilteredMultimap</semanticResources>
1013 <semanticResources>java:/Objects/com.google.common.collect.FilteredSetMultimap</semanticResources>
1014 <semanticResources>java:/Objects/com.google.common.base.Converter</semanticResources>
1015 <semanticResources>java:/Objects/com.google.common.collect.BiMap</semanticResources>
1016 <semanticResources>java:/Objects/com.google.common.collect.ForwardingMap</semanticResources>
1017 <semanticResources>java:/Objects/com.google.common.collect.AbstractNavigableMap</semanticResources>
1018 <semanticResources>java:/Objects/com.google.common.collect.MapDifference</semanticResources>
1019 <semanticResources>java:/Objects/com.google.common.collect.SortedMapDifference</semanticResources>
1020 <semanticResources>java:/Objects/com.google.common.collect.ForwardingSortedMap</semanticResources>
1021 <semanticResources>java:/Objects/com.google.common.base.Equivalence</semanticResources>
1022 <semanticResources>java:/Objects/java.util.function.BiPredicate</semanticResources>
1023 <semanticResources>java:/Objects/java.util.IdentityHashMap</semanticResources>
1024 <semanticResources>java:/Objects/com.google.common.collect.ForwardingMultiset</semanticResources>
1025 <semanticResources>java:/Objects/com.google.common.collect.SortedMultiset</semanticResources>
1026 <semanticResources>java:/Objects/com.google.common.collect.SortedMultisetBridge</semanticResources>
1027 <semanticResources>java:/Objects/com.google.common.collect.SortedIterable</semanticResources>
1028 <semanticResources>java:/Objects/com.google.common.base.Joiner</semanticResources>
1029 <semanticResources>java:/Objects/com.google.common.collect.ImmutableSortedSet</semanticResources>
1030 <semanticResources>java:/Objects/com.google.common.collect.ImmutableSortedSetFauxverideShim</semanticResources>
1031 <semanticResources>java:/Objects/com.google.common.collect.RegularImmutableSortedSet</semanticResources>
1032 <semanticResources>java:/Objects/com.google.common.collect.ImmutableSortedMap</semanticResources>
1033 <semanticResources>java:/Objects/com.google.common.collect.ImmutableSortedMapFauxverideShim</semanticResources>
1034 <semanticResources>java:/Objects/java.util.Collections</semanticResources>
1035 <semanticResources>java:/Objects/java.util.AbstractQueue</semanticResources>
1036 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ComparableExtensions</semanticResources>
1037 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.DoubleExtensions</semanticResources>
1038 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.FloatExtensions</semanticResources>
1039 <semanticResources>java:/Objects/java.lang.Float</semanticResources>
1040 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.FunctionExtensions</semanticResources>
1041 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.Functions</semanticResources>
1042 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.IntegerExtensions</semanticResources>
1043 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ExclusiveRange</semanticResources>
1044 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.IntegerRange</semanticResources>
1045 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.IterableExtensions</semanticResources>
1046 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.IteratorExtensions</semanticResources>
1047 <semanticResources>java:/Objects/com.google.common.collect.Iterators</semanticResources>
1048 <semanticResources>java:/Objects/com.google.common.collect.AbstractIndexedListIterator</semanticResources>
1049 <semanticResources>java:/Objects/com.google.common.collect.PeekingIterator</semanticResources>
1050 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ListExtensions</semanticResources>
1051 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.LongExtensions</semanticResources>
1052 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.MapExtensions</semanticResources>
1053 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.internal.UnmodifiableMergingMapView</semanticResources>
1054 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ObjectExtensions</semanticResources>
1055 <semanticResources>java:/Objects/com.google.common.base.Objects</semanticResources>
1056 <semanticResources>java:/Objects/com.google.common.base.ExtraObjectsMethodsForWeb</semanticResources>
1057 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ProcedureExtensions</semanticResources>
1058 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.ShortExtensions</semanticResources>
1059 <semanticResources>java:/Objects/java.lang.Short</semanticResources>
1060 <semanticResources>java:/Objects/org.eclipse.xtext.xbase.lib.StringExtensions</semanticResources>
1061 <ownedViews xmi:type="viewpoint:DView" uid="_R6jlsA7_Eee1dfpzdcS6YA">
1062 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
1063 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_WlTx4R3XEeeQBfI0hkDaPg" name="modes3-domain" repPath="#_QqO3ABFUEeeHWeeZwj2u8w" changeId="5336d6ad-0418-43b4-b439-053a489228c4">
1064 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
1065 <target xmi:type="ecore:EPackage" href="modes3.ecore#/"/>
1066 </ownedRepresentationDescriptors>
1067 </ownedViews>
1068 <ownedViews xmi:type="viewpoint:DView" uid="_OHrasBFUEeeHWeeZwj2u8w">
1069 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Review']"/>
1070 </ownedViews>
1071 <ownedViews xmi:type="viewpoint:DView" uid="_OH-VoBFUEeeHWeeZwj2u8w">
1072 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']"/>
1073 </ownedViews>
1074 <ownedViews xmi:type="viewpoint:DView" uid="_OIvxsBFUEeeHWeeZwj2u8w">
1075 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Generation']"/>
1076 </ownedViews>
1077 </viewpoint:DAnalysis>
1078 <diagram:DSemanticDiagram uid="_QqO3ABFUEeeHWeeZwj2u8w">
1079 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_QqO3ARFUEeeHWeeZwj2u8w" source="DANNOTATION_CUSTOMIZATION_KEY">
1080 <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_QqO3AhFUEeeHWeeZwj2u8w">
1081 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_4vAR4GrPEeqC0oOqPAS8qg" sourceArrow="FillDiamond" routingStyle="manhattan">
1082 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
1083 <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_4vAR4WrPEeqC0oOqPAS8qg" showIcon="false" labelExpression="service:render">
1084 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
1085 </centerLabelStyleDescription>
1086 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_4vAR4mrPEeqC0oOqPAS8qg" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel">
1087 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
1088 </endLabelStyleDescription>
1089 </computedStyleDescriptions>
1090 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_vpT04NGqEeqNWYR5K-zBag" routingStyle="manhattan">
1091 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
1092 <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_vpT04dGqEeqNWYR5K-zBag" showIcon="false" labelExpression="service:render">
1093 <labelFormat>bold</labelFormat>
1094 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
1095 </centerLabelStyleDescription>
1096 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_vpT04tGqEeqNWYR5K-zBag" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel">
1097 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
1098 </endLabelStyleDescription>
1099 </computedStyleDescriptions>
1100 </data>
1101 </ownedAnnotationEntries>
1102 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_QqZPEBFUEeeHWeeZwj2u8w" source="GMF_DIAGRAMS">
1103 <data xmi:type="notation:Diagram" xmi:id="_QqZPERFUEeeHWeeZwj2u8w" type="Sirius" element="_QqO3ABFUEeeHWeeZwj2u8w" measurementUnit="Pixel">
1104 <children xmi:type="notation:Node" xmi:id="_u0Dbcx9kEee278vFHA2N9A" type="2003" element="_uyq7YB9kEee278vFHA2N9A">
1105 <children xmi:type="notation:Node" xmi:id="_u0Dbdh9kEee278vFHA2N9A" type="5007"/>
1106 <children xmi:type="notation:Node" xmi:id="_u0ECgB9kEee278vFHA2N9A" type="7004">
1107 <children xmi:type="notation:Node" xmi:id="_sGnOAGrPEeqC0oOqPAS8qg" type="3010" element="_sFw5cGrPEeqC0oOqPAS8qg">
1108 <styles xmi:type="notation:FontStyle" xmi:id="_sGnOAWrPEeqC0oOqPAS8qg" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/>
1109 <layoutConstraint xmi:type="notation:Location" xmi:id="_sGnOAmrPEeqC0oOqPAS8qg"/>
1110 </children>
1111 <styles xmi:type="notation:SortingStyle" xmi:id="_u0ECgR9kEee278vFHA2N9A"/>
1112 <styles xmi:type="notation:FilteringStyle" xmi:id="_u0ECgh9kEee278vFHA2N9A"/>
1113 </children>
1114 <styles xmi:type="notation:ShapeStyle" xmi:id="_u0DbdB9kEee278vFHA2N9A" fontColor="2697711" fontName="Droid Sans" fontHeight="8" fillColor="16250871"/>
1115 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_u0DbdR9kEee278vFHA2N9A" x="108" y="144" width="151" height="51"/>
1116 </children>
1117 <children xmi:type="notation:Node" xmi:id="_HaIZUB9lEee278vFHA2N9A" type="2003" element="_HZ5IwB9lEee278vFHA2N9A">
1118 <children xmi:type="notation:Node" xmi:id="_HaIZUx9lEee278vFHA2N9A" type="5007"/>
1119 <children xmi:type="notation:Node" xmi:id="_HaIZVB9lEee278vFHA2N9A" type="7004">
1120 <children xmi:type="notation:Node" xmi:id="_4SIysL8WEeebfIyBIV4aqw" type="3010" element="_4R8lcL8WEeebfIyBIV4aqw">
1121 <styles xmi:type="notation:FontStyle" xmi:id="_4SIysb8WEeebfIyBIV4aqw" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/>
1122 <layoutConstraint xmi:type="notation:Location" xmi:id="_4SIysr8WEeebfIyBIV4aqw"/>
1123 </children>
1124 <styles xmi:type="notation:SortingStyle" xmi:id="_HaIZVR9lEee278vFHA2N9A"/>
1125 <styles xmi:type="notation:FilteringStyle" xmi:id="_HaIZVh9lEee278vFHA2N9A"/>
1126 </children>
1127 <styles xmi:type="notation:ShapeStyle" xmi:id="_HaIZUR9lEee278vFHA2N9A" fontName="Droid Sans" fontHeight="8"/>
1128 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_HaIZUh9lEee278vFHA2N9A" x="256" y="60" width="126" height="62"/>
1129 </children>
1130 <children xmi:type="notation:Node" xmi:id="_I1qRkCB1EeeUF8d36bwwGg" type="2003" element="_I1kK8CB1EeeUF8d36bwwGg">
1131 <children xmi:type="notation:Node" xmi:id="_I1qRkyB1EeeUF8d36bwwGg" type="5007"/>
1132 <children xmi:type="notation:Node" xmi:id="_I1qRlCB1EeeUF8d36bwwGg" type="7004">
1133 <styles xmi:type="notation:SortingStyle" xmi:id="_I1qRlSB1EeeUF8d36bwwGg"/>
1134 <styles xmi:type="notation:FilteringStyle" xmi:id="_I1qRliB1EeeUF8d36bwwGg"/>
1135 </children>
1136 <styles xmi:type="notation:ShapeStyle" xmi:id="_I1qRkSB1EeeUF8d36bwwGg" fontName="Droid Sans" fontHeight="8" fillColor="16250871"/>
1137 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_I1qRkiB1EeeUF8d36bwwGg" x="108" y="228" width="151" height="51"/>
1138 </children>
1139 <children xmi:type="notation:Node" xmi:id="_fHXZECB1EeeUF8d36bwwGg" type="2003" element="_fHIIgCB1EeeUF8d36bwwGg">
1140 <children xmi:type="notation:Node" xmi:id="_fHXZEyB1EeeUF8d36bwwGg" type="5007"/>
1141 <children xmi:type="notation:Node" xmi:id="_fHXZFCB1EeeUF8d36bwwGg" type="7004">
1142 <children xmi:type="notation:Node" xmi:id="_t3c5gGrPEeqC0oOqPAS8qg" type="3010" element="_t28jMGrPEeqC0oOqPAS8qg">
1143 <styles xmi:type="notation:FontStyle" xmi:id="_t3c5gWrPEeqC0oOqPAS8qg" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/>
1144 <layoutConstraint xmi:type="notation:Location" xmi:id="_t3c5gmrPEeqC0oOqPAS8qg"/>
1145 </children>
1146 <children xmi:type="notation:Node" xmi:id="_0lh7EGrPEeqC0oOqPAS8qg" type="3010" element="_0lKusGrPEeqC0oOqPAS8qg">
1147 <styles xmi:type="notation:FontStyle" xmi:id="_0lh7EWrPEeqC0oOqPAS8qg" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/>
1148 <layoutConstraint xmi:type="notation:Location" xmi:id="_0lh7EmrPEeqC0oOqPAS8qg"/>
1149 </children>
1150 <styles xmi:type="notation:SortingStyle" xmi:id="_fHXZFSB1EeeUF8d36bwwGg"/>
1151 <styles xmi:type="notation:FilteringStyle" xmi:id="_fHXZFiB1EeeUF8d36bwwGg"/>
1152 </children>
1153 <styles xmi:type="notation:ShapeStyle" xmi:id="_fHXZESB1EeeUF8d36bwwGg" fontName="Droid Sans" fontHeight="8" fillColor="16250871"/>
1154 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fHXZEiB1EeeUF8d36bwwGg" x="360" y="168" width="159" height="76"/>
1155 </children>
1156 <styles xmi:type="notation:DiagramStyle" xmi:id="_QqZPEhFUEeeHWeeZwj2u8w">
1157 <horizontalGuides xmi:type="notation:Guide" xmi:id="_9p7HcBFWEeeHWeeZwj2u8w" position="-3"/>
1158 <horizontalGuides xmi:type="notation:Guide" xmi:id="__YY0YBFWEeeHWeeZwj2u8w" position="188"/>
1159 <horizontalGuides xmi:type="notation:Guide" xmi:id="_G_Ya8BFXEeeHWeeZwj2u8w" position="264"/>
1160 <horizontalGuides xmi:type="notation:Guide" xmi:id="_MV83ABFXEeeHWeeZwj2u8w" position="341"/>
1161 <horizontalGuides xmi:type="notation:Guide" xmi:id="_YR8u8BFXEeeHWeeZwj2u8w" position="491"/>
1162 <horizontalGuides xmi:type="notation:Guide" xmi:id="_5rK9cBFXEeeHWeeZwj2u8w" position="604">
1163 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_6OVU4BFXEeeHWeeZwj2u8w"/>
1164 </horizontalGuides>
1165 <horizontalGuides xmi:type="notation:Guide" xmi:id="_Dzs6YBPOEeeca8alBUq9TA" position="716"/>
1166 <verticalGuides xmi:type="notation:Guide" xmi:id="_WIJw4BFXEeeHWeeZwj2u8w" position="1170">
1167 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_Wx0Y8RFXEeeHWeeZwj2u8w"/>
1168 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_YxACcRFXEeeHWeeZwj2u8w"/>
1169 </verticalGuides>
1170 <verticalGuides xmi:type="notation:Guide" xmi:id="_crsWYBFXEeeHWeeZwj2u8w" position="1438">
1171 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_dCqr8RFXEeeHWeeZwj2u8w"/>
1172 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_ASJRcBFYEeeHWeeZwj2u8w" value="Left"/>
1173 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_f25RoBPJEeeca8alBUq9TA" value="Left"/>
1174 </verticalGuides>
1175 <verticalGuides xmi:type="notation:Guide" xmi:id="_gf1WYBFXEeeHWeeZwj2u8w" position="1305">
1176 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_gyEV4RFXEeeHWeeZwj2u8w"/>
1177 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_GzF18RFYEeeHWeeZwj2u8w"/>
1178 </verticalGuides>
1179 <verticalGuides xmi:type="notation:Guide" xmi:id="_oK8n8BFXEeeHWeeZwj2u8w" position="832">
1180 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_pTpVYBFXEeeHWeeZwj2u8w"/>
1181 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_uO4Y8BFaEeeHWeeZwj2u8w"/>
1182 </verticalGuides>
1183 <verticalGuides xmi:type="notation:Guide" xmi:id="_q0VFABFXEeeHWeeZwj2u8w" position="490">
1184 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_roqsARFXEeeHWeeZwj2u8w"/>
1185 </verticalGuides>
1186 <verticalGuides xmi:type="notation:Guide" xmi:id="_twEdYBFXEeeHWeeZwj2u8w" position="659">
1187 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_uWEtcBFXEeeHWeeZwj2u8w"/>
1188 </verticalGuides>
1189 <verticalGuides xmi:type="notation:Guide" xmi:id="_z65n8BFXEeeHWeeZwj2u8w" position="1662">
1190 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_6OVU4RFXEeeHWeeZwj2u8w"/>
1191 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_BPVScRFYEeeHWeeZwj2u8w" value="Left"/>
1192 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_pmIMgBPIEeeca8alBUq9TA" value="Left"/>
1193 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_UnN64BPOEeeca8alBUq9TA"/>
1194 </verticalGuides>
1195 <verticalGuides xmi:type="notation:Guide" xmi:id="_D1WScBFYEeeHWeeZwj2u8w" position="1815">
1196 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_FdQEYRFYEeeHWeeZwj2u8w"/>
1197 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_85-0ERPOEeeca8alBUq9TA"/>
1198 </verticalGuides>
1199 <verticalGuides xmi:type="notation:Guide" xmi:id="_iXt2UBPOEeeca8alBUq9TA" position="1890">
1200 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_ji_9sRPOEeeca8alBUq9TA"/>
1201 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_vBqZYRPOEeeca8alBUq9TA"/>
1202 </verticalGuides>
1203 <verticalGuides xmi:type="notation:Guide" xmi:id="_srmEcBPPEeeca8alBUq9TA" position="1739">
1204 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_zs6LEBPPEeeca8alBUq9TA"/>
1205 </verticalGuides>
1206 <verticalGuides xmi:type="notation:Guide" xmi:id="_6e7RcBPPEeeca8alBUq9TA" position="1966">
1207 <nodeMap xmi:type="notation:NodeEntry" xmi:id="_7DL1ERPPEeeca8alBUq9TA"/>
1208 </verticalGuides>
1209 </styles>
1210 <edges xmi:type="notation:Edge" xmi:id="_59dRwCB1EeeUF8d36bwwGg" type="4001" element="_59UH0CB1EeeUF8d36bwwGg" source="_I1qRkCB1EeeUF8d36bwwGg" target="_u0Dbcx9kEee278vFHA2N9A">
1211 <children xmi:type="notation:Node" xmi:id="_59dRxCB1EeeUF8d36bwwGg" type="6001">
1212 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_59dRxSB1EeeUF8d36bwwGg" y="48"/>
1213 </children>
1214 <children xmi:type="notation:Node" xmi:id="_59dRxiB1EeeUF8d36bwwGg" type="6002">
1215 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_59dRxyB1EeeUF8d36bwwGg" x="8"/>
1216 </children>
1217 <children xmi:type="notation:Node" xmi:id="_59dRyCB1EeeUF8d36bwwGg" type="6003">
1218 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_59dRySB1EeeUF8d36bwwGg" x="-10"/>
1219 </children>
1220 <styles xmi:type="notation:ConnectorStyle" xmi:id="_59dRwSB1EeeUF8d36bwwGg" routing="Rectilinear"/>
1221 <styles xmi:type="notation:FontStyle" xmi:id="_59dRwiB1EeeUF8d36bwwGg" fontColor="7490599" fontName="Droid Sans" fontHeight="8"/>
1222 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_59dRwyB1EeeUF8d36bwwGg" points="[-34, 0, 24, 32]$[-34, -35, 24, -3]"/>
1223 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_59dRyiB1EeeUF8d36bwwGg" id="(0.469910514541387,0.0)"/>
1224 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_59dRyyB1EeeUF8d36bwwGg" id="(0.08713738976094071,1.0670553935860059)"/>
1225 </edges>
1226 <edges xmi:type="notation:Edge" xmi:id="_9vKBwCB1EeeUF8d36bwwGg" type="4001" element="_9vA30CB1EeeUF8d36bwwGg" source="_I1qRkCB1EeeUF8d36bwwGg" target="_u0Dbcx9kEee278vFHA2N9A">
1227 <children xmi:type="notation:Node" xmi:id="_9vKo0CB1EeeUF8d36bwwGg" type="6001">
1228 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9vKo0SB1EeeUF8d36bwwGg" x="5" y="-54" width="85" height="27"/>
1229 </children>
1230 <children xmi:type="notation:Node" xmi:id="_9vKo0iB1EeeUF8d36bwwGg" type="6002">
1231 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9vKo0yB1EeeUF8d36bwwGg" x="2"/>
1232 </children>
1233 <children xmi:type="notation:Node" xmi:id="_9vKo1CB1EeeUF8d36bwwGg" type="6003">
1234 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9vKo1SB1EeeUF8d36bwwGg" x="-10"/>
1235 </children>
1236 <styles xmi:type="notation:ConnectorStyle" xmi:id="_9vKBwSB1EeeUF8d36bwwGg" routing="Rectilinear"/>
1237 <styles xmi:type="notation:FontStyle" xmi:id="_9vKBwiB1EeeUF8d36bwwGg" fontColor="7490599" fontName="Droid Sans" fontHeight="8"/>
1238 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_9vKBwyB1EeeUF8d36bwwGg" points="[-14, -24, -8, 63]$[-14, -59, -8, 28]"/>
1239 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_9vKo1iB1EeeUF8d36bwwGg" id="(0.1796100990731863,0.49426020408163257)"/>
1240 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_9vKo1yB1EeeUF8d36bwwGg" id="(0.13994120583504355,0.4347262714609653)"/>
1241 </edges>
1242 <edges xmi:type="notation:Edge" xmi:id="_h9HE4CB6EeeUF8d36bwwGg" type="4001" element="_h9BlUCB6EeeUF8d36bwwGg" source="_u0Dbcx9kEee278vFHA2N9A" target="_u0Dbcx9kEee278vFHA2N9A">
1243 <children xmi:type="notation:Node" xmi:id="_h9HE5CB6EeeUF8d36bwwGg" type="6001">
1244 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_h9HE5SB6EeeUF8d36bwwGg" x="-12" y="-12"/>
1245 </children>
1246 <children xmi:type="notation:Node" xmi:id="_h9Hr8CB6EeeUF8d36bwwGg" type="6002">
1247 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_h9Hr8SB6EeeUF8d36bwwGg" x="5"/>
1248 </children>
1249 <children xmi:type="notation:Node" xmi:id="_h9Hr8iB6EeeUF8d36bwwGg" type="6003">
1250 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_h9Hr8yB6EeeUF8d36bwwGg" x="-2" y="-10"/>
1251 </children>
1252 <styles xmi:type="notation:ConnectorStyle" xmi:id="_h9HE4SB6EeeUF8d36bwwGg" routing="Rectilinear"/>
1253 <styles xmi:type="notation:FontStyle" xmi:id="_h9HE4iB6EeeUF8d36bwwGg" fontColor="7490599" fontName="Droid Sans" fontHeight="8"/>
1254 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_h9HE4yB6EeeUF8d36bwwGg" points="[-31, -11, -46, -30]$[-31, -29, -46, -48]$[15, -29, 0, -48]$[15, -11, 0, -30]"/>
1255 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_h9Hr9CB6EeeUF8d36bwwGg" id="(0.3775583781685063,0.23712342079689017)"/>
1256 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_XjizcCIDEeeSweRcnMPZRQ" id="(0.4798657718120805,0.6224489795918368)"/>
1257 </edges>
1258 <edges xmi:type="notation:Edge" xmi:id="_O0izYDGjEeePY54_4mjBmA" type="4001" element="_OyqkEDGjEeePY54_4mjBmA" source="_u0Dbcx9kEee278vFHA2N9A" target="_fHXZECB1EeeUF8d36bwwGg">
1259 <children xmi:type="notation:Node" xmi:id="_O0jacDGjEeePY54_4mjBmA" type="6001">
1260 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O0jacTGjEeePY54_4mjBmA" x="-32" y="14"/>
1261 </children>
1262 <children xmi:type="notation:Node" xmi:id="_O0kBgDGjEeePY54_4mjBmA" type="6002">
1263 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O0kBgTGjEeePY54_4mjBmA" x="25" y="-10"/>
1264 </children>
1265 <children xmi:type="notation:Node" xmi:id="_O0kBgjGjEeePY54_4mjBmA" type="6003">
1266 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_O0kBgzGjEeePY54_4mjBmA" x="-30" y="12"/>
1267 </children>
1268 <styles xmi:type="notation:ConnectorStyle" xmi:id="_O0izYTGjEeePY54_4mjBmA" routing="Rectilinear"/>
1269 <styles xmi:type="notation:FontStyle" xmi:id="_O0izYjGjEeePY54_4mjBmA" fontName="Segoe UI" fontHeight="8"/>
1270 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_O0izYzGjEeePY54_4mjBmA" points="[1, 0, -104, -26]$[44, 0, -61, -26]$[44, 26, -61, 0]$[104, 26, -1, 0]"/>
1271 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_O0kokDGjEeePY54_4mjBmA" id="(0.9932885906040269,0.5714285714285714)"/>
1272 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_O0kokTGjEeePY54_4mjBmA" id="(0.006369426751592357,0.40540540540540543)"/>
1273 </edges>
1274 <edges xmi:type="notation:Edge" xmi:id="_4vdk4GrPEeqC0oOqPAS8qg" type="4001" element="_4u-ctmrPEeqC0oOqPAS8qg" source="_HaIZUB9lEee278vFHA2N9A" target="_fHXZECB1EeeUF8d36bwwGg">
1275 <children xmi:type="notation:Node" xmi:id="_4vnV4GrPEeqC0oOqPAS8qg" type="6001">
1276 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4vnV4WrPEeqC0oOqPAS8qg" x="44" y="38"/>
1277 </children>
1278 <children xmi:type="notation:Node" xmi:id="_4vokAGrPEeqC0oOqPAS8qg" type="6002">
1279 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4vokAWrPEeqC0oOqPAS8qg" x="33" y="8"/>
1280 </children>
1281 <children xmi:type="notation:Node" xmi:id="_4vqZMGrPEeqC0oOqPAS8qg" type="6003">
1282 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4vqZMWrPEeqC0oOqPAS8qg" x="-36"/>
1283 </children>
1284 <styles xmi:type="notation:ConnectorStyle" xmi:id="_4vdk4WrPEeqC0oOqPAS8qg" routing="Rectilinear"/>
1285 <styles xmi:type="notation:FontStyle" xmi:id="_4vdk4mrPEeqC0oOqPAS8qg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/>
1286 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_4vdk42rPEeqC0oOqPAS8qg" points="[0, 33, -76, -61]$[59, 33, -17, -61]$[59, 94, -17, 0]"/>
1287 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_4vv4wGrPEeqC0oOqPAS8qg" id="(1.0,0.24266609145815363)"/>
1288 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_4vv4wWrPEeqC0oOqPAS8qg" id="(0.6114649681528662,0.0)"/>
1289 </edges>
1290 <edges xmi:type="notation:Edge" xmi:id="_-NwZkGrPEeqC0oOqPAS8qg" type="4001" element="_-NSfgGrPEeqC0oOqPAS8qg" source="_HaIZUB9lEee278vFHA2N9A" target="_u0Dbcx9kEee278vFHA2N9A">
1291 <children xmi:type="notation:Node" xmi:id="_-NxAoGrPEeqC0oOqPAS8qg" type="6001">
1292 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-NxAoWrPEeqC0oOqPAS8qg" x="-49" y="-29"/>
1293 </children>
1294 <children xmi:type="notation:Node" xmi:id="_-NxAomrPEeqC0oOqPAS8qg" type="6002">
1295 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-NxAo2rPEeqC0oOqPAS8qg" x="10" y="-10"/>
1296 </children>
1297 <children xmi:type="notation:Node" xmi:id="_-NxApGrPEeqC0oOqPAS8qg" type="6003">
1298 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-NxApWrPEeqC0oOqPAS8qg"/>
1299 </children>
1300 <styles xmi:type="notation:ConnectorStyle" xmi:id="_-NwZkWrPEeqC0oOqPAS8qg" routing="Rectilinear"/>
1301 <styles xmi:type="notation:FontStyle" xmi:id="_-NwZkmrPEeqC0oOqPAS8qg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/>
1302 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-NwZk2rPEeqC0oOqPAS8qg" points="[-62, -14, 52, -36]$[-102, -14, 12, -36]$[-102, 22, 12, 0]"/>
1303 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-NxnsGrPEeqC0oOqPAS8qg" id="(0.5,1.0353753235547887)"/>
1304 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-NxnsWrPEeqC0oOqPAS8qg" id="(0.6442953020134228,0.0)"/>
1305 </edges>
1306 <edges xmi:type="notation:Edge" xmi:id="_AwsQYGrQEeqC0oOqPAS8qg" type="4001" element="_AwjGgmrQEeqC0oOqPAS8qg" source="_HaIZUB9lEee278vFHA2N9A" target="_I1qRkCB1EeeUF8d36bwwGg">
1307 <children xmi:type="notation:Node" xmi:id="_AwsQZGrQEeqC0oOqPAS8qg" type="6001">
1308 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AwsQZWrQEeqC0oOqPAS8qg" x="150" y="-48"/>
1309 </children>
1310 <children xmi:type="notation:Node" xmi:id="_Aws3cGrQEeqC0oOqPAS8qg" type="6002">
1311 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Aws3cWrQEeqC0oOqPAS8qg" x="26" y="-10"/>
1312 </children>
1313 <children xmi:type="notation:Node" xmi:id="_Aws3cmrQEeqC0oOqPAS8qg" type="6003">
1314 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Aws3c2rQEeqC0oOqPAS8qg" x="71" y="10"/>
1315 </children>
1316 <styles xmi:type="notation:ConnectorStyle" xmi:id="_AwsQYWrQEeqC0oOqPAS8qg" routing="Rectilinear"/>
1317 <styles xmi:type="notation:FontStyle" xmi:id="_AwsQYmrQEeqC0oOqPAS8qg" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/>
1318 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_AwsQY2rQEeqC0oOqPAS8qg" points="[-84, -33, 40, -139]$[-316, -33, -192, -139]$[-316, 142, -192, 36]$[-232, 142, -108, 36]"/>
1319 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Aws3dGrQEeqC0oOqPAS8qg" id="(0.6774193548387096,1.0353753235547887)"/>
1320 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Aws3dWrQEeqC0oOqPAS8qg" id="(0.7248322147651006,0.0)"/>
1321 </edges>
1322 <edges xmi:type="notation:Edge" xmi:id="_Z0Ta0Gr8EeqC0oOqPAS8qg" type="4001" element="_Z0H0oGr8EeqC0oOqPAS8qg" source="_I1qRkCB1EeeUF8d36bwwGg" target="_u0Dbcx9kEee278vFHA2N9A">
1323 <children xmi:type="notation:Node" xmi:id="_Z0UB4Gr8EeqC0oOqPAS8qg" type="6001">
1324 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z0UB4Wr8EeqC0oOqPAS8qg" x="-10" y="2"/>
1325 </children>
1326 <children xmi:type="notation:Node" xmi:id="_Z0UB4mr8EeqC0oOqPAS8qg" type="6002">
1327 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z0UB42r8EeqC0oOqPAS8qg" x="14" y="2"/>
1328 </children>
1329 <children xmi:type="notation:Node" xmi:id="_Z0UB5Gr8EeqC0oOqPAS8qg" type="6003">
1330 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z0UB5Wr8EeqC0oOqPAS8qg" x="-18"/>
1331 </children>
1332 <styles xmi:type="notation:ConnectorStyle" xmi:id="_Z0Ta0Wr8EeqC0oOqPAS8qg" routing="Tree"/>
1333 <styles xmi:type="notation:FontStyle" xmi:id="_Z0Ta0mr8EeqC0oOqPAS8qg" fontName="Noto Sans" fontHeight="8"/>
1334 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Z0Ta02r8EeqC0oOqPAS8qg" points="[0, 0, 70, 60]$[0, 0, 70, 60]$[-12, 0, 58, 60]$[-12, -35, 58, 25]"/>
1335 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Z0UB5mr8EeqC0oOqPAS8qg" id="(0.9664429530201343,0.0)"/>
1336 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Z0UB52r8EeqC0oOqPAS8qg" id="(0.5,0.5)"/>
1337 </edges>
1338 </data>
1339 </ownedAnnotationEntries>
1340 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_uyq7YB9kEee278vFHA2N9A" name="Segment" tooltipText="" outgoingEdges="_h9BlUCB6EeeUF8d36bwwGg _OyqkEDGjEeePY54_4mjBmA" incomingEdges="_59UH0CB1EeeUF8d36bwwGg _9vA30CB1EeeUF8d36bwwGg _h9BlUCB6EeeUF8d36bwwGg _-NSfgGrPEeqC0oOqPAS8qg _Z0H0oGr8EeqC0oOqPAS8qg" width="12" height="10">
1341 <target xmi:type="ecore:EClass" href="modes3.ecore#//Segment"/>
1342 <semanticElements xmi:type="ecore:EClass" href="modes3.ecore#//Segment"/>
1343 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1344 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1345 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1346 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_srHpQWrPEeqC0oOqPAS8qg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="247,247,247" foregroundColor="247,247,247">
1347 <customFeatures>backgroundColor</customFeatures>
1348 <customFeatures>foregroundColor</customFeatures>
1349 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1350 </ownedStyle>
1351 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1352 <ownedElements xmi:type="diagram:DNodeListElement" uid="_sFw5cGrPEeqC0oOqPAS8qg" name="id : EInt" tooltipText="">
1353 <target xmi:type="ecore:EAttribute" href="modes3.ecore#//Segment/id"/>
1354 <semanticElements xmi:type="ecore:EAttribute" href="modes3.ecore#//Segment/id"/>
1355 <ownedStyle xmi:type="diagram:BundledImage" uid="_srKskWrPEeqC0oOqPAS8qg" labelAlignment="LEFT">
1356 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
1357 </ownedStyle>
1358 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
1359 </ownedElements>
1360 </ownedDiagramElements>
1361 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_HZ5IwB9lEee278vFHA2N9A" name="Modes3ModelRoot" tooltipText="" outgoingEdges="_4u-ctmrPEeqC0oOqPAS8qg _-NSfgGrPEeqC0oOqPAS8qg _AwjGgmrQEeqC0oOqPAS8qg" width="12" height="10">
1362 <target xmi:type="ecore:EClass" href="modes3.ecore#//Modes3ModelRoot"/>
1363 <semanticElements xmi:type="ecore:EClass" href="modes3.ecore#//Modes3ModelRoot"/>
1364 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1365 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1366 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1367 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_40AwsL8WEeebfIyBIV4aqw" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,255,255">
1368 <customFeatures>labelColor</customFeatures>
1369 <customFeatures>backgroundColor</customFeatures>
1370 <customFeatures>foregroundColor</customFeatures>
1371 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1372 </ownedStyle>
1373 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1374 <ownedElements xmi:type="diagram:DNodeListElement" uid="_4R8lcL8WEeebfIyBIV4aqw" name="id : EInt" tooltipText="">
1375 <target xmi:type="ecore:EAttribute" href="modes3.ecore#//Modes3ModelRoot/id"/>
1376 <semanticElements xmi:type="ecore:EAttribute" href="modes3.ecore#//Modes3ModelRoot/id"/>
1377 <ownedStyle xmi:type="diagram:BundledImage" uid="_40B-0L8WEeebfIyBIV4aqw" labelAlignment="LEFT">
1378 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
1379 </ownedStyle>
1380 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
1381 </ownedElements>
1382 </ownedDiagramElements>
1383 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_I1kK8CB1EeeUF8d36bwwGg" name="Turnout" tooltipText="" outgoingEdges="_59UH0CB1EeeUF8d36bwwGg _9vA30CB1EeeUF8d36bwwGg _Z0H0oGr8EeqC0oOqPAS8qg" incomingEdges="_AwjGgmrQEeqC0oOqPAS8qg" width="12" height="10">
1384 <target xmi:type="ecore:EClass" href="modes3.ecore#//Turnout"/>
1385 <semanticElements xmi:type="ecore:EClass" href="modes3.ecore#//Turnout"/>
1386 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1387 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1388 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1389 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_I1kyACB1EeeUF8d36bwwGg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="247,247,247" foregroundColor="247,247,247">
1390 <customFeatures>backgroundColor</customFeatures>
1391 <customFeatures>foregroundColor</customFeatures>
1392 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1393 </ownedStyle>
1394 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1395 </ownedDiagramElements>
1396 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_fHIIgCB1EeeUF8d36bwwGg" name="Train" tooltipText="" incomingEdges="_OyqkEDGjEeePY54_4mjBmA _4u-ctmrPEeqC0oOqPAS8qg" width="12" height="10">
1397 <target xmi:type="ecore:EClass" href="modes3.ecore#//Train"/>
1398 <semanticElements xmi:type="ecore:EClass" href="modes3.ecore#//Train"/>
1399 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1400 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1401 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1402 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_1pOzwWrPEeqC0oOqPAS8qg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="247,247,247" foregroundColor="247,247,247">
1403 <customFeatures>backgroundColor</customFeatures>
1404 <customFeatures>foregroundColor</customFeatures>
1405 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1406 </ownedStyle>
1407 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1408 <ownedElements xmi:type="diagram:DNodeListElement" uid="_t28jMGrPEeqC0oOqPAS8qg" name="id : EInt" tooltipText="">
1409 <target xmi:type="ecore:EAttribute" href="modes3.ecore#//Train/id"/>
1410 <semanticElements xmi:type="ecore:EAttribute" href="modes3.ecore#//Train/id"/>
1411 <ownedStyle xmi:type="diagram:BundledImage" uid="_uh_rUWrPEeqC0oOqPAS8qg" labelAlignment="LEFT">
1412 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
1413 </ownedStyle>
1414 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
1415 </ownedElements>
1416 <ownedElements xmi:type="diagram:DNodeListElement" uid="_0lKusGrPEeqC0oOqPAS8qg" name="speed : EDouble = 0.0" tooltipText="">
1417 <target xmi:type="ecore:EAttribute" href="modes3.ecore#//Train/speed"/>
1418 <semanticElements xmi:type="ecore:EAttribute" href="modes3.ecore#//Train/speed"/>
1419 <ownedStyle xmi:type="diagram:BundledImage" uid="_1pR3EmrPEeqC0oOqPAS8qg" labelAlignment="LEFT">
1420 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
1421 </ownedStyle>
1422 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
1423 </ownedElements>
1424 </ownedDiagramElements>
1425 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_59UH0CB1EeeUF8d36bwwGg" name="[1..1] straight" sourceNode="_I1kK8CB1EeeUF8d36bwwGg" targetNode="_uyq7YB9kEee278vFHA2N9A">
1426 <target xmi:type="ecore:EReference" href="modes3.ecore#//Turnout/straight"/>
1427 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Turnout/straight"/>
1428 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_wkfDsNGqEeqNWYR5K-zBag" description="_vpT04NGqEeqNWYR5K-zBag" routingStyle="manhattan" strokeColor="0,0,0">
1429 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_wkfDstGqEeqNWYR5K-zBag" showIcon="false">
1430 <labelFormat>bold</labelFormat>
1431 </centerLabelStyle>
1432 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_wkfDsdGqEeqNWYR5K-zBag" labelSize="6" showIcon="false" labelColor="39,76,114"/>
1433 </ownedStyle>
1434 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
1435 </ownedDiagramElements>
1436 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_9vA30CB1EeeUF8d36bwwGg" name="[1..1] divergent" sourceNode="_I1kK8CB1EeeUF8d36bwwGg" targetNode="_uyq7YB9kEee278vFHA2N9A">
1437 <target xmi:type="ecore:EReference" href="modes3.ecore#//Turnout/divergent"/>
1438 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Turnout/divergent"/>
1439 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_vpT049GqEeqNWYR5K-zBag" description="_vpT04NGqEeqNWYR5K-zBag" routingStyle="manhattan" strokeColor="0,0,0">
1440 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_vpT05dGqEeqNWYR5K-zBag" showIcon="false">
1441 <labelFormat>bold</labelFormat>
1442 </centerLabelStyle>
1443 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_vpT05NGqEeqNWYR5K-zBag" labelSize="6" showIcon="false" labelColor="39,76,114"/>
1444 </ownedStyle>
1445 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
1446 </ownedDiagramElements>
1447 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_h9BlUCB6EeeUF8d36bwwGg" name="[0..2] connectedTo" sourceNode="_uyq7YB9kEee278vFHA2N9A" targetNode="_uyq7YB9kEee278vFHA2N9A">
1448 <target xmi:type="ecore:EReference" href="modes3.ecore#//Segment/connectedTo"/>
1449 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Segment/connectedTo"/>
1450 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_h9CMYCB6EeeUF8d36bwwGg" routingStyle="manhattan" strokeColor="0,0,0">
1451 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/>
1452 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_h9CMYSB6EeeUF8d36bwwGg" showIcon="false">
1453 <customFeatures>labelSize</customFeatures>
1454 </centerLabelStyle>
1455 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_h9CMYiB6EeeUF8d36bwwGg" showIcon="false" labelColor="39,76,114">
1456 <customFeatures>labelSize</customFeatures>
1457 </endLabelStyle>
1458 </ownedStyle>
1459 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
1460 </ownedDiagramElements>
1461 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_OyqkEDGjEeePY54_4mjBmA" sourceNode="_uyq7YB9kEee278vFHA2N9A" targetNode="_fHIIgCB1EeeUF8d36bwwGg" beginLabel="[1..1] location" endLabel="[0..1] occupiedBy">
1462 <target xmi:type="ecore:EReference" href="modes3.ecore#//Segment/occupiedBy"/>
1463 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Train/location"/>
1464 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Segment/occupiedBy"/>
1465 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_O0DEIDGjEeePY54_4mjBmA" sourceArrow="InputArrow" routingStyle="manhattan" strokeColor="0,0,0">
1466 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']/@style"/>
1467 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_O0DEITGjEeePY54_4mjBmA" showIcon="false"/>
1468 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_O0DEIjGjEeePY54_4mjBmA" showIcon="false"/>
1469 </ownedStyle>
1470 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/>
1471 </ownedDiagramElements>
1472 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_4u-ctmrPEeqC0oOqPAS8qg" name="[0..*] trains" sourceNode="_HZ5IwB9lEee278vFHA2N9A" targetNode="_fHIIgCB1EeeUF8d36bwwGg">
1473 <target xmi:type="ecore:EReference" href="modes3.ecore#//Modes3ModelRoot/trains"/>
1474 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Modes3ModelRoot/trains"/>
1475 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_4vA48GrPEeqC0oOqPAS8qg" description="_4vAR4GrPEeqC0oOqPAS8qg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
1476 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_4vA48mrPEeqC0oOqPAS8qg" showIcon="false">
1477 <customFeatures>labelSize</customFeatures>
1478 </centerLabelStyle>
1479 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_4vA48WrPEeqC0oOqPAS8qg" showIcon="false" labelColor="39,76,114">
1480 <customFeatures>labelSize</customFeatures>
1481 </endLabelStyle>
1482 </ownedStyle>
1483 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
1484 </ownedDiagramElements>
1485 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_-NSfgGrPEeqC0oOqPAS8qg" name="[0..*] segments" sourceNode="_HZ5IwB9lEee278vFHA2N9A" targetNode="_uyq7YB9kEee278vFHA2N9A">
1486 <target xmi:type="ecore:EReference" href="modes3.ecore#//Modes3ModelRoot/segments"/>
1487 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Modes3ModelRoot/segments"/>
1488 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_-NTtoGrPEeqC0oOqPAS8qg" description="_4vAR4GrPEeqC0oOqPAS8qg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
1489 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_-NTtomrPEeqC0oOqPAS8qg" showIcon="false">
1490 <customFeatures>labelSize</customFeatures>
1491 </centerLabelStyle>
1492 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_-NTtoWrPEeqC0oOqPAS8qg" showIcon="false" labelColor="39,76,114">
1493 <customFeatures>labelSize</customFeatures>
1494 </endLabelStyle>
1495 </ownedStyle>
1496 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
1497 </ownedDiagramElements>
1498 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_AwjGgmrQEeqC0oOqPAS8qg" name="[0..*] turnouts" sourceNode="_HZ5IwB9lEee278vFHA2N9A" targetNode="_I1kK8CB1EeeUF8d36bwwGg">
1499 <target xmi:type="ecore:EReference" href="modes3.ecore#//Modes3ModelRoot/turnouts"/>
1500 <semanticElements xmi:type="ecore:EReference" href="modes3.ecore#//Modes3ModelRoot/turnouts"/>
1501 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_AwjtgGrQEeqC0oOqPAS8qg" description="_4vAR4GrPEeqC0oOqPAS8qg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
1502 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_AwjtgmrQEeqC0oOqPAS8qg" showIcon="false">
1503 <customFeatures>labelSize</customFeatures>
1504 </centerLabelStyle>
1505 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_AwjtgWrQEeqC0oOqPAS8qg" showIcon="false" labelColor="39,76,114">
1506 <customFeatures>labelSize</customFeatures>
1507 </endLabelStyle>
1508 </ownedStyle>
1509 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
1510 </ownedDiagramElements>
1511 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_Z0H0oGr8EeqC0oOqPAS8qg" sourceNode="_I1kK8CB1EeeUF8d36bwwGg" targetNode="_uyq7YB9kEee278vFHA2N9A">
1512 <target xmi:type="ecore:EClass" href="modes3.ecore#//Turnout"/>
1513 <semanticElements xmi:type="ecore:EClass" href="modes3.ecore#//Turnout"/>
1514 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_Z0H0oWr8EeqC0oOqPAS8qg" targetArrow="InputClosedArrow" routingStyle="tree">
1515 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
1516 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_Z0H0omr8EeqC0oOqPAS8qg" showIcon="false">
1517 <labelFormat>italic</labelFormat>
1518 </beginLabelStyle>
1519 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_Z0H0o2r8EeqC0oOqPAS8qg" showIcon="false"/>
1520 </ownedStyle>
1521 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
1522 </ownedDiagramElements>
1523 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
1524 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_QqO3BRFUEeeHWeeZwj2u8w"/>
1525 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
1526 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/>
1527 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/>
1528 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/>
1529 <target xmi:type="ecore:EPackage" href="modes3.ecore#/"/>
1530 </diagram:DSemanticDiagram>
1531</xmi:XMI>
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.ecore b/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.ecore
index aa50b778..f7cb28be 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.ecore
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.ecore
@@ -13,7 +13,7 @@
13 <eStructuralFeatures xsi:type="ecore:EReference" name="trains" upperBound="-1" 13 <eStructuralFeatures xsi:type="ecore:EReference" name="trains" upperBound="-1"
14 eType="#//Train" containment="true"/> 14 eType="#//Train" containment="true"/>
15 <eStructuralFeatures xsi:type="ecore:EReference" name="segments" upperBound="-1" 15 <eStructuralFeatures xsi:type="ecore:EReference" name="segments" upperBound="-1"
16 eType="#//Segment" containment="true"/> 16 eType="#//SimpleSegment" containment="true"/>
17 <eStructuralFeatures xsi:type="ecore:EReference" name="turnouts" upperBound="-1" 17 <eStructuralFeatures xsi:type="ecore:EReference" name="turnouts" upperBound="-1"
18 eType="#//Turnout" containment="true"/> 18 eType="#//Turnout" containment="true"/>
19 </eClassifiers> 19 </eClassifiers>
@@ -29,4 +29,5 @@
29 <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> 29 <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
30 <eStructuralFeatures xsi:type="ecore:EAttribute" name="speed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> 30 <eStructuralFeatures xsi:type="ecore:EAttribute" name="speed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
31 </eClassifiers> 31 </eClassifiers>
32 <eClassifiers xsi:type="ecore:EClass" name="SimpleSegment" eSuperTypes="#//Segment"/>
32</ecore:EPackage> 33</ecore:EPackage>
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.genmodel b/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.genmodel
index 1a6c7a84..1cd4ac41 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.genmodel
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/model/modes3.genmodel
@@ -26,5 +26,6 @@
26 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute modes3.ecore#//Train/id"/> 26 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute modes3.ecore#//Train/id"/>
27 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute modes3.ecore#//Train/speed"/> 27 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute modes3.ecore#//Train/speed"/>
28 </genClasses> 28 </genClasses>
29 <genClasses ecoreClass="modes3.ecore#//SimpleSegment"/>
29 </genPackages> 30 </genPackages>
30</genmodel:GenModel> 31</genmodel:GenModel>
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution.partialinterpretation b/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution.partialinterpretation
deleted file mode 100644
index bbf46091..00000000
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution.partialinterpretation
+++ /dev/null
@@ -1,1068 +0,0 @@
1<?xml version="1.0" encoding="ASCII"?>
2<language:LogicProblem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore2logicannotations="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/ecore2logicannotation" xmlns:language="http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" xmlns:language_1="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" xmlns:viatra2logicannotations="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/viatra2logicannotation">
3 <types xsi:type="language_1:TypeDeclaration" name="Segment class" subtypes="//@types.2"/>
4 <types xsi:type="language_1:TypeDeclaration" name="Modes3ModelRoot class" subtypes="//@types.4 //@types.5" isAbstract="true"/>
5 <types xsi:type="language_1:TypeDeclaration" name="Turnout class" supertypes="//@types.0"/>
6 <types xsi:type="language_1:TypeDeclaration" name="Train class"/>
7 <types xsi:type="language_1:TypeDefinition" name="Modes3ModelRoot class DefinedPart" supertypes="//@types.1" elements="//@elements.0"/>
8 <types xsi:type="language_1:TypeDeclaration" name="Modes3ModelRoot class UndefinedPart" supertypes="//@types.1"/>
9 <assertions name="upperMultiplicity connectedTo Segment" annotations="//@annotations.0">
10 <value xsi:type="language_1:Forall">
11 <quantifiedVariables name="src">
12 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
13 </quantifiedVariables>
14 <quantifiedVariables name="trg 1">
15 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
16 </quantifiedVariables>
17 <quantifiedVariables name="trg 2">
18 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
19 </quantifiedVariables>
20 <quantifiedVariables name="trg 3">
21 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
22 </quantifiedVariables>
23 <expression xsi:type="language_1:Impl">
24 <leftOperand xsi:type="language_1:And">
25 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
26 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.0"/>
27 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.1"/>
28 </operands>
29 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
30 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.0"/>
31 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.2"/>
32 </operands>
33 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
34 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.0"/>
35 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.3"/>
36 </operands>
37 </leftOperand>
38 <rightOperand xsi:type="language_1:Not">
39 <operand xsi:type="language_1:Distinct">
40 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.1"/>
41 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.2"/>
42 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.3"/>
43 </operand>
44 </rightOperand>
45 </expression>
46 </value>
47 </assertions>
48 <assertions name="upperMultiplicity occupiedBy Segment" annotations="//@annotations.1">
49 <value xsi:type="language_1:Forall">
50 <quantifiedVariables name="src">
51 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
52 </quantifiedVariables>
53 <quantifiedVariables name="trg 1">
54 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
55 </quantifiedVariables>
56 <quantifiedVariables name="trg 2">
57 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
58 </quantifiedVariables>
59 <expression xsi:type="language_1:Impl">
60 <leftOperand xsi:type="language_1:And">
61 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.1">
62 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.0"/>
63 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.1"/>
64 </operands>
65 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.1">
66 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.0"/>
67 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.2"/>
68 </operands>
69 </leftOperand>
70 <rightOperand xsi:type="language_1:Not">
71 <operand xsi:type="language_1:Distinct">
72 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.1"/>
73 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.2"/>
74 </operand>
75 </rightOperand>
76 </expression>
77 </value>
78 </assertions>
79 <assertions name="lowerMultiplicity straight Turnout" annotations="//@annotations.2">
80 <value xsi:type="language_1:Forall">
81 <quantifiedVariables name="src">
82 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
83 </quantifiedVariables>
84 <expression xsi:type="language_1:Exists">
85 <quantifiedVariables name="trg 1">
86 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
87 </quantifiedVariables>
88 <expression xsi:type="language_1:And">
89 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
90 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@quantifiedVariables.0"/>
91 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@expression/@quantifiedVariables.0"/>
92 </operands>
93 </expression>
94 </expression>
95 </value>
96 </assertions>
97 <assertions name="upperMultiplicity straight Turnout" annotations="//@annotations.3">
98 <value xsi:type="language_1:Forall">
99 <quantifiedVariables name="src">
100 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
101 </quantifiedVariables>
102 <quantifiedVariables name="trg 1">
103 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
104 </quantifiedVariables>
105 <quantifiedVariables name="trg 2">
106 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
107 </quantifiedVariables>
108 <expression xsi:type="language_1:Impl">
109 <leftOperand xsi:type="language_1:And">
110 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
111 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.0"/>
112 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.1"/>
113 </operands>
114 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
115 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.0"/>
116 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.2"/>
117 </operands>
118 </leftOperand>
119 <rightOperand xsi:type="language_1:Not">
120 <operand xsi:type="language_1:Distinct">
121 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.1"/>
122 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.2"/>
123 </operand>
124 </rightOperand>
125 </expression>
126 </value>
127 </assertions>
128 <assertions name="lowerMultiplicity divergent Turnout" annotations="//@annotations.4">
129 <value xsi:type="language_1:Forall">
130 <quantifiedVariables name="src">
131 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
132 </quantifiedVariables>
133 <expression xsi:type="language_1:Exists">
134 <quantifiedVariables name="trg 1">
135 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
136 </quantifiedVariables>
137 <expression xsi:type="language_1:And">
138 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
139 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@quantifiedVariables.0"/>
140 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@expression/@quantifiedVariables.0"/>
141 </operands>
142 </expression>
143 </expression>
144 </value>
145 </assertions>
146 <assertions name="upperMultiplicity divergent Turnout" annotations="//@annotations.5">
147 <value xsi:type="language_1:Forall">
148 <quantifiedVariables name="src">
149 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
150 </quantifiedVariables>
151 <quantifiedVariables name="trg 1">
152 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
153 </quantifiedVariables>
154 <quantifiedVariables name="trg 2">
155 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
156 </quantifiedVariables>
157 <expression xsi:type="language_1:Impl">
158 <leftOperand xsi:type="language_1:And">
159 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
160 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.0"/>
161 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.1"/>
162 </operands>
163 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
164 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.0"/>
165 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.2"/>
166 </operands>
167 </leftOperand>
168 <rightOperand xsi:type="language_1:Not">
169 <operand xsi:type="language_1:Distinct">
170 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.1"/>
171 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.2"/>
172 </operand>
173 </rightOperand>
174 </expression>
175 </value>
176 </assertions>
177 <assertions name="lowerMultiplicity location Train" annotations="//@annotations.6">
178 <value xsi:type="language_1:Forall">
179 <quantifiedVariables name="src">
180 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
181 </quantifiedVariables>
182 <expression xsi:type="language_1:Exists">
183 <quantifiedVariables name="trg 1">
184 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
185 </quantifiedVariables>
186 <expression xsi:type="language_1:And">
187 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.7">
188 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@quantifiedVariables.0"/>
189 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@expression/@quantifiedVariables.0"/>
190 </operands>
191 </expression>
192 </expression>
193 </value>
194 </assertions>
195 <assertions name="upperMultiplicity location Train" annotations="//@annotations.7">
196 <value xsi:type="language_1:Forall">
197 <quantifiedVariables name="src">
198 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
199 </quantifiedVariables>
200 <quantifiedVariables name="trg 1">
201 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
202 </quantifiedVariables>
203 <quantifiedVariables name="trg 2">
204 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
205 </quantifiedVariables>
206 <expression xsi:type="language_1:Impl">
207 <leftOperand xsi:type="language_1:And">
208 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.7">
209 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.0"/>
210 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.1"/>
211 </operands>
212 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.7">
213 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.0"/>
214 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.2"/>
215 </operands>
216 </leftOperand>
217 <rightOperand xsi:type="language_1:Not">
218 <operand xsi:type="language_1:Distinct">
219 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.1"/>
220 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.2"/>
221 </operand>
222 </rightOperand>
223 </expression>
224 </value>
225 </assertions>
226 <assertions name="oppositeReference occupiedBy Segment" annotations="//@annotations.8">
227 <value xsi:type="language_1:Forall">
228 <quantifiedVariables name="src">
229 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
230 </quantifiedVariables>
231 <quantifiedVariables name="trg">
232 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
233 </quantifiedVariables>
234 <expression xsi:type="language_1:Iff">
235 <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.1">
236 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.0"/>
237 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.1"/>
238 </leftOperand>
239 <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.7">
240 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.1"/>
241 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.0"/>
242 </rightOperand>
243 </expression>
244 </value>
245 </assertions>
246 <assertions name="oppositeReference connectedTo reference Segment connectedTo reference Segment" annotations="//@annotations.9">
247 <value xsi:type="language_1:Forall">
248 <quantifiedVariables name="src">
249 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
250 </quantifiedVariables>
251 <quantifiedVariables name="trg">
252 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
253 </quantifiedVariables>
254 <expression xsi:type="language_1:Iff">
255 <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
256 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.0"/>
257 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.1"/>
258 </leftOperand>
259 <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
260 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.1"/>
261 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.0"/>
262 </rightOperand>
263 </expression>
264 </value>
265 </assertions>
266 <assertions name="errorpattern modes3 queries turnoutInSegments" annotations="//@annotations.29">
267 <value xsi:type="language_1:Forall">
268 <quantifiedVariables name="p0">
269 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
270 </quantifiedVariables>
271 <expression xsi:type="language_1:Not">
272 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.8">
273 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.10/@value/@quantifiedVariables.0"/>
274 </operand>
275 </expression>
276 </value>
277 </assertions>
278 <assertions name="errorpattern modes3 queries unreachable" annotations="//@annotations.30">
279 <value xsi:type="language_1:Forall">
280 <quantifiedVariables name="p0">
281 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
282 </quantifiedVariables>
283 <quantifiedVariables name="p1">
284 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
285 </quantifiedVariables>
286 <expression xsi:type="language_1:Not">
287 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.9">
288 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.0"/>
289 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.1"/>
290 </operand>
291 </expression>
292 </value>
293 </assertions>
294 <assertions name="errorpattern modes3 queries turnoutOutputsAreSame" annotations="//@annotations.31">
295 <value xsi:type="language_1:Forall">
296 <quantifiedVariables name="p0">
297 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
298 </quantifiedVariables>
299 <expression xsi:type="language_1:Not">
300 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.11">
301 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.12/@value/@quantifiedVariables.0"/>
302 </operand>
303 </expression>
304 </value>
305 </assertions>
306 <assertions name="errorpattern modes3 queries turnoutConnectedToBothOutputs" annotations="//@annotations.32">
307 <value xsi:type="language_1:Forall">
308 <quantifiedVariables name="p0">
309 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
310 </quantifiedVariables>
311 <expression xsi:type="language_1:Not">
312 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13">
313 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.13/@value/@quantifiedVariables.0"/>
314 </operand>
315 </expression>
316 </value>
317 </assertions>
318 <assertions name="errorpattern modes3 queries tooManyExtraInputsOfTurnout" annotations="//@annotations.33">
319 <value xsi:type="language_1:Forall">
320 <quantifiedVariables name="p0">
321 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
322 </quantifiedVariables>
323 <expression xsi:type="language_1:Not">
324 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.14">
325 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.14/@value/@quantifiedVariables.0"/>
326 </operand>
327 </expression>
328 </value>
329 </assertions>
330 <assertions name="errorpattern modes3 queries connectedToReflexive" annotations="//@annotations.34">
331 <value xsi:type="language_1:Forall">
332 <quantifiedVariables name="p0">
333 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
334 </quantifiedVariables>
335 <expression xsi:type="language_1:Not">
336 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.15">
337 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.15/@value/@quantifiedVariables.0"/>
338 </operand>
339 </expression>
340 </value>
341 </assertions>
342 <assertions name="errorpattern modes3 queries outputReflexive" annotations="//@annotations.35">
343 <value xsi:type="language_1:Forall">
344 <quantifiedVariables name="p0">
345 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
346 </quantifiedVariables>
347 <expression xsi:type="language_1:Not">
348 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.18">
349 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.16/@value/@quantifiedVariables.0"/>
350 </operand>
351 </expression>
352 </value>
353 </assertions>
354 <assertions name="errorpattern modes3 queries tooManyInputsOfSegment" annotations="//@annotations.36">
355 <value xsi:type="language_1:Forall">
356 <quantifiedVariables name="p0">
357 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
358 </quantifiedVariables>
359 <expression xsi:type="language_1:Not">
360 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19">
361 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.17/@value/@quantifiedVariables.0"/>
362 </operand>
363 </expression>
364 </value>
365 </assertions>
366 <assertions name="errorpattern modes3 queries noExtraInputOfTurnout" annotations="//@annotations.37">
367 <value xsi:type="language_1:Forall">
368 <quantifiedVariables name="p0">
369 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
370 </quantifiedVariables>
371 <expression xsi:type="language_1:Not">
372 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.20">
373 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.18/@value/@quantifiedVariables.0"/>
374 </operand>
375 </expression>
376 </value>
377 </assertions>
378 <assertions name="errorpattern modes3 queries turnoutNotConnectedToOutput" annotations="//@annotations.38">
379 <value xsi:type="language_1:Forall">
380 <quantifiedVariables name="p0">
381 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
382 </quantifiedVariables>
383 <expression xsi:type="language_1:Not">
384 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22">
385 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.19/@value/@quantifiedVariables.0"/>
386 </operand>
387 </expression>
388 </value>
389 </assertions>
390 <assertions name="errorpattern modes3 queries connectedToNotSymmetric" annotations="//@annotations.39">
391 <value xsi:type="language_1:Forall">
392 <quantifiedVariables name="p0">
393 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
394 </quantifiedVariables>
395 <quantifiedVariables name="p1">
396 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
397 </quantifiedVariables>
398 <expression xsi:type="language_1:Not">
399 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24">
400 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.0"/>
401 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.1"/>
402 </operand>
403 </expression>
404 </value>
405 </assertions>
406 <assertions name="errorpattern modes3 queries noInputOfSegment" annotations="//@annotations.40">
407 <value xsi:type="language_1:Forall">
408 <quantifiedVariables name="p0">
409 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
410 </quantifiedVariables>
411 <expression xsi:type="language_1:Not">
412 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.26">
413 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.21/@value/@quantifiedVariables.0"/>
414 </operand>
415 </expression>
416 </value>
417 </assertions>
418 <relations xsi:type="language_1:RelationDeclaration" name="connectedTo reference Segment">
419 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
420 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
421 </relations>
422 <relations xsi:type="language_1:RelationDeclaration" name="occupiedBy reference Segment">
423 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
424 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
425 </relations>
426 <relations xsi:type="language_1:RelationDeclaration" name="trains reference Modes3ModelRoot">
427 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/>
428 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
429 </relations>
430 <relations xsi:type="language_1:RelationDeclaration" name="segments reference Modes3ModelRoot">
431 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/>
432 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
433 </relations>
434 <relations xsi:type="language_1:RelationDeclaration" name="turnouts reference Modes3ModelRoot">
435 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/>
436 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
437 </relations>
438 <relations xsi:type="language_1:RelationDeclaration" name="straight reference Turnout">
439 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
440 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
441 </relations>
442 <relations xsi:type="language_1:RelationDeclaration" name="divergent reference Turnout">
443 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
444 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
445 </relations>
446 <relations xsi:type="language_1:RelationDeclaration" name="location reference Train">
447 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/>
448 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
449 </relations>
450 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries turnoutInSegments" annotations="//@annotations.10">
451 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
452 <variables name="parameter T">
453 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
454 </variables>
455 <value xsi:type="language_1:Or">
456 <operands xsi:type="language_1:Exists">
457 <quantifiedVariables name="variable 0">
458 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/>
459 </quantifiedVariables>
460 <expression xsi:type="language_1:And">
461 <operands xsi:type="language_1:InstanceOf">
462 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.8/@variables.0"/>
463 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
464 </operands>
465 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.3">
466 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.8/@value/@operands.0/@quantifiedVariables.0"/>
467 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.8/@variables.0"/>
468 </operands>
469 </expression>
470 </operands>
471 </value>
472 </relations>
473 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries unreachable" annotations="//@annotations.11">
474 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
475 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
476 <variables name="parameter S1">
477 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
478 </variables>
479 <variables name="parameter S2">
480 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
481 </variables>
482 <value xsi:type="language_1:Or">
483 <operands xsi:type="language_1:And">
484 <operands xsi:type="language_1:InstanceOf">
485 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.9/@variables.0"/>
486 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
487 </operands>
488 <operands xsi:type="language_1:InstanceOf">
489 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.9/@variables.1"/>
490 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
491 </operands>
492 <operands xsi:type="language_1:Not">
493 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.21">
494 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.9/@variables.0"/>
495 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.9/@variables.1"/>
496 </operand>
497 </operands>
498 </operands>
499 </value>
500 </relations>
501 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries turnout" annotations="//@annotations.12">
502 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
503 <variables name="parameter T">
504 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
505 </variables>
506 <value xsi:type="language_1:Or">
507 <operands xsi:type="language_1:And">
508 <operands xsi:type="language_1:InstanceOf">
509 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.10/@variables.0"/>
510 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
511 </operands>
512 </operands>
513 </value>
514 </relations>
515 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries turnoutOutputsAreSame" annotations="//@annotations.13">
516 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
517 <variables name="parameter T">
518 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
519 </variables>
520 <value xsi:type="language_1:Or">
521 <operands xsi:type="language_1:Exists">
522 <quantifiedVariables name="variable S">
523 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
524 </quantifiedVariables>
525 <expression xsi:type="language_1:And">
526 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
527 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.11/@variables.0"/>
528 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.11/@value/@operands.0/@quantifiedVariables.0"/>
529 </operands>
530 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
531 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.11/@variables.0"/>
532 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.11/@value/@operands.0/@quantifiedVariables.0"/>
533 </operands>
534 <operands xsi:type="language_1:InstanceOf">
535 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.11/@value/@operands.0/@quantifiedVariables.0"/>
536 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
537 </operands>
538 </expression>
539 </operands>
540 </value>
541 </relations>
542 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries extraInputOfTurnout" annotations="//@annotations.14">
543 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
544 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
545 <variables name="parameter T">
546 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
547 </variables>
548 <variables name="parameter S">
549 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
550 </variables>
551 <value xsi:type="language_1:Or">
552 <operands xsi:type="language_1:Exists">
553 <quantifiedVariables name="variable Straight">
554 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
555 </quantifiedVariables>
556 <quantifiedVariables name="variable Divergent">
557 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
558 </quantifiedVariables>
559 <expression xsi:type="language_1:And">
560 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
561 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@variables.0"/>
562 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
563 </operands>
564 <operands xsi:type="language_1:InstanceOf">
565 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
566 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
567 </operands>
568 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
569 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@variables.0"/>
570 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@value/@operands.0/@quantifiedVariables.1"/>
571 </operands>
572 <operands xsi:type="language_1:InstanceOf">
573 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@value/@operands.0/@quantifiedVariables.1"/>
574 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
575 </operands>
576 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25">
577 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@variables.1"/>
578 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@variables.0"/>
579 </operands>
580 <operands xsi:type="language_1:Distinct">
581 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@variables.1"/>
582 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
583 </operands>
584 <operands xsi:type="language_1:Distinct">
585 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@variables.1"/>
586 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12/@value/@operands.0/@quantifiedVariables.1"/>
587 </operands>
588 </expression>
589 </operands>
590 </value>
591 </relations>
592 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries turnoutConnectedToBothOutputs" annotations="//@annotations.15">
593 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
594 <variables name="parameter T">
595 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
596 </variables>
597 <value xsi:type="language_1:Or">
598 <operands xsi:type="language_1:Exists">
599 <quantifiedVariables name="variable Straight">
600 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
601 </quantifiedVariables>
602 <quantifiedVariables name="variable Divergent">
603 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
604 </quantifiedVariables>
605 <expression xsi:type="language_1:And">
606 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
607 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@variables.0"/>
608 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@value/@operands.0/@quantifiedVariables.0"/>
609 </operands>
610 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
611 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@variables.0"/>
612 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@value/@operands.0/@quantifiedVariables.1"/>
613 </operands>
614 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
615 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@variables.0"/>
616 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@value/@operands.0/@quantifiedVariables.0"/>
617 </operands>
618 <operands xsi:type="language_1:InstanceOf">
619 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@value/@operands.0/@quantifiedVariables.0"/>
620 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
621 </operands>
622 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
623 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@variables.0"/>
624 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@value/@operands.0/@quantifiedVariables.1"/>
625 </operands>
626 <operands xsi:type="language_1:InstanceOf">
627 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.13/@value/@operands.0/@quantifiedVariables.1"/>
628 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
629 </operands>
630 </expression>
631 </operands>
632 </value>
633 </relations>
634 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries tooManyExtraInputsOfTurnout" annotations="//@annotations.16">
635 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
636 <variables name="parameter T">
637 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
638 </variables>
639 <value xsi:type="language_1:Or">
640 <operands xsi:type="language_1:Exists">
641 <quantifiedVariables name="variable I1">
642 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
643 </quantifiedVariables>
644 <quantifiedVariables name="variable I2">
645 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
646 </quantifiedVariables>
647 <expression xsi:type="language_1:And">
648 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12">
649 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.14/@variables.0"/>
650 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.14/@value/@operands.0/@quantifiedVariables.0"/>
651 </operands>
652 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12">
653 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.14/@variables.0"/>
654 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.14/@value/@operands.0/@quantifiedVariables.1"/>
655 </operands>
656 <operands xsi:type="language_1:Distinct">
657 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.14/@value/@operands.0/@quantifiedVariables.0"/>
658 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.14/@value/@operands.0/@quantifiedVariables.1"/>
659 </operands>
660 </expression>
661 </operands>
662 </value>
663 </relations>
664 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries connectedToReflexive" annotations="//@annotations.17">
665 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
666 <variables name="parameter S">
667 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
668 </variables>
669 <value xsi:type="language_1:Or">
670 <operands xsi:type="language_1:And">
671 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
672 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.15/@variables.0"/>
673 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.15/@variables.0"/>
674 </operands>
675 </operands>
676 </value>
677 </relations>
678 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries turnoutOutput" annotations="//@annotations.18">
679 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
680 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
681 <variables name="parameter T">
682 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
683 </variables>
684 <variables name="parameter S">
685 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
686 </variables>
687 <value xsi:type="language_1:Or">
688 <operands xsi:type="language_1:And">
689 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
690 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16/@variables.0"/>
691 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16/@variables.1"/>
692 </operands>
693 <operands xsi:type="language_1:InstanceOf">
694 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16/@variables.1"/>
695 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
696 </operands>
697 </operands>
698 <operands xsi:type="language_1:And">
699 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
700 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16/@variables.0"/>
701 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16/@variables.1"/>
702 </operands>
703 <operands xsi:type="language_1:InstanceOf">
704 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16/@variables.1"/>
705 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
706 </operands>
707 </operands>
708 </value>
709 </relations>
710 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries connectedTo" annotations="//@annotations.19">
711 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
712 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
713 <variables name="parameter S1">
714 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
715 </variables>
716 <variables name="parameter S2">
717 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
718 </variables>
719 <value xsi:type="language_1:Or">
720 <operands xsi:type="language_1:And">
721 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
722 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.17/@variables.0"/>
723 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.17/@variables.1"/>
724 </operands>
725 <operands xsi:type="language_1:InstanceOf">
726 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.17/@variables.1"/>
727 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
728 </operands>
729 </operands>
730 </value>
731 </relations>
732 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries outputReflexive" annotations="//@annotations.20">
733 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
734 <variables name="parameter T">
735 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
736 </variables>
737 <value xsi:type="language_1:Or">
738 <operands xsi:type="language_1:And">
739 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16">
740 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.18/@variables.0"/>
741 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.18/@variables.0"/>
742 </operands>
743 </operands>
744 </value>
745 </relations>
746 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries tooManyInputsOfSegment" annotations="//@annotations.21">
747 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
748 <variables name="parameter S">
749 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
750 </variables>
751 <value xsi:type="language_1:Or">
752 <operands xsi:type="language_1:Exists">
753 <quantifiedVariables name="variable I1">
754 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
755 </quantifiedVariables>
756 <quantifiedVariables name="variable I2">
757 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
758 </quantifiedVariables>
759 <quantifiedVariables name="variable I3">
760 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
761 </quantifiedVariables>
762 <expression xsi:type="language_1:And">
763 <operands xsi:type="language_1:Not">
764 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.10">
765 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@variables.0"/>
766 </operand>
767 </operands>
768 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25">
769 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.0"/>
770 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@variables.0"/>
771 </operands>
772 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25">
773 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.1"/>
774 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@variables.0"/>
775 </operands>
776 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25">
777 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.2"/>
778 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@variables.0"/>
779 </operands>
780 <operands xsi:type="language_1:Distinct">
781 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.0"/>
782 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.1"/>
783 </operands>
784 <operands xsi:type="language_1:Distinct">
785 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.0"/>
786 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.2"/>
787 </operands>
788 <operands xsi:type="language_1:Distinct">
789 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.1"/>
790 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19/@value/@operands.0/@quantifiedVariables.2"/>
791 </operands>
792 </expression>
793 </operands>
794 </value>
795 </relations>
796 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries noExtraInputOfTurnout" annotations="//@annotations.22">
797 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
798 <variables name="parameter T">
799 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
800 </variables>
801 <value xsi:type="language_1:Or">
802 <operands xsi:type="language_1:Forall">
803 <quantifiedVariables name="variable 0">
804 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
805 </quantifiedVariables>
806 <expression xsi:type="language_1:And">
807 <operands xsi:type="language_1:InstanceOf">
808 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.20/@variables.0"/>
809 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
810 </operands>
811 <operands xsi:type="language_1:Not">
812 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.12">
813 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.20/@variables.0"/>
814 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.20/@value/@operands.0/@quantifiedVariables.0"/>
815 </operand>
816 </operands>
817 </expression>
818 </operands>
819 </value>
820 </relations>
821 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries reachable" annotations="//@annotations.23">
822 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
823 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
824 <variables name="parameter S1">
825 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
826 </variables>
827 <variables name="parameter S2">
828 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
829 </variables>
830 <value xsi:type="language_1:Or">
831 <operands xsi:type="language_1:And">
832 <operands xsi:type="language_1:InstanceOf">
833 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.21/@variables.1"/>
834 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
835 </operands>
836 </operands>
837 <operands xsi:type="language_1:And">
838 <operands xsi:type="language_1:TransitiveClosure" relation="//@relations.23">
839 <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.21/@variables.0"/>
840 <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.21/@variables.1"/>
841 </operands>
842 </operands>
843 </value>
844 </relations>
845 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries turnoutNotConnectedToOutput" annotations="//@annotations.24">
846 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
847 <variables name="parameter T">
848 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/>
849 </variables>
850 <value xsi:type="language_1:Or">
851 <operands xsi:type="language_1:Exists">
852 <quantifiedVariables name="variable Straight">
853 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
854 </quantifiedVariables>
855 <quantifiedVariables name="variable Divergent">
856 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
857 </quantifiedVariables>
858 <expression xsi:type="language_1:And">
859 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.5">
860 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@variables.0"/>
861 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@value/@operands.0/@quantifiedVariables.0"/>
862 </operands>
863 <operands xsi:type="language_1:InstanceOf">
864 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@value/@operands.0/@quantifiedVariables.0"/>
865 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
866 </operands>
867 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6">
868 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@variables.0"/>
869 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@value/@operands.0/@quantifiedVariables.1"/>
870 </operands>
871 <operands xsi:type="language_1:InstanceOf">
872 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@value/@operands.0/@quantifiedVariables.1"/>
873 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
874 </operands>
875 <operands xsi:type="language_1:Not">
876 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.17">
877 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@variables.0"/>
878 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@value/@operands.0/@quantifiedVariables.0"/>
879 </operand>
880 </operands>
881 <operands xsi:type="language_1:Not">
882 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.17">
883 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@variables.0"/>
884 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22/@value/@operands.0/@quantifiedVariables.1"/>
885 </operand>
886 </operands>
887 </expression>
888 </operands>
889 </value>
890 </relations>
891 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries adjacent" annotations="//@annotations.25">
892 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
893 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
894 <variables name="parameter S1">
895 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
896 </variables>
897 <variables name="parameter S2">
898 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
899 </variables>
900 <value xsi:type="language_1:Or">
901 <operands xsi:type="language_1:And">
902 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25">
903 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.23/@variables.0"/>
904 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.23/@variables.1"/>
905 </operands>
906 </operands>
907 <operands xsi:type="language_1:And">
908 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16">
909 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.23/@variables.1"/>
910 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.23/@variables.0"/>
911 </operands>
912 </operands>
913 </value>
914 </relations>
915 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries connectedToNotSymmetric" annotations="//@annotations.26">
916 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
917 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
918 <variables name="parameter S1">
919 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
920 </variables>
921 <variables name="parameter S2">
922 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
923 </variables>
924 <value xsi:type="language_1:Or">
925 <operands xsi:type="language_1:And">
926 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
927 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24/@variables.0"/>
928 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24/@variables.1"/>
929 </operands>
930 <operands xsi:type="language_1:InstanceOf">
931 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24/@variables.1"/>
932 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
933 </operands>
934 <operands xsi:type="language_1:Not">
935 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.17">
936 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24/@variables.1"/>
937 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24/@variables.0"/>
938 </operand>
939 </operands>
940 </operands>
941 </value>
942 </relations>
943 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries output" annotations="//@annotations.27">
944 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
945 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
946 <variables name="parameter S1">
947 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
948 </variables>
949 <variables name="parameter S2">
950 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
951 </variables>
952 <value xsi:type="language_1:Or">
953 <operands xsi:type="language_1:And">
954 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0">
955 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25/@variables.0"/>
956 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25/@variables.1"/>
957 </operands>
958 <operands xsi:type="language_1:InstanceOf">
959 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25/@variables.1"/>
960 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
961 </operands>
962 </operands>
963 <operands xsi:type="language_1:And">
964 <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16">
965 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25/@variables.0"/>
966 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25/@variables.1"/>
967 </operands>
968 </operands>
969 </value>
970 </relations>
971 <relations xsi:type="language_1:RelationDefinition" name="pattern modes3 queries noInputOfSegment" annotations="//@annotations.28">
972 <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
973 <variables name="parameter S">
974 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
975 </variables>
976 <value xsi:type="language_1:Or">
977 <operands xsi:type="language_1:Forall">
978 <quantifiedVariables name="variable 0">
979 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
980 </quantifiedVariables>
981 <expression xsi:type="language_1:And">
982 <operands xsi:type="language_1:InstanceOf">
983 <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.26/@variables.0"/>
984 <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/>
985 </operands>
986 <operands xsi:type="language_1:Not">
987 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.10">
988 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.26/@variables.0"/>
989 </operand>
990 </operands>
991 <operands xsi:type="language_1:Not">
992 <operand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.25">
993 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.26/@value/@operands.0/@quantifiedVariables.0"/>
994 <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.26/@variables.0"/>
995 </operand>
996 </operands>
997 </expression>
998 </operands>
999 </value>
1000 </relations>
1001 <elements name="o 1" definedInType="//@types.4"/>
1002 <containmentHierarchies typesOrderedInHierarchy="//@types.0 //@types.2 //@types.3 //@types.1 //@types.4 //@types.5" containmentRelations="//@relations.2 //@relations.3 //@relations.4"/>
1003 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.0" relation="//@relations.0" upper="2"/>
1004 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.1" relation="//@relations.1" upper="1"/>
1005 <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@assertions.2" relation="//@relations.5" lower="1"/>
1006 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.3" relation="//@relations.5" upper="1"/>
1007 <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@assertions.4" relation="//@relations.6" lower="1"/>
1008 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.5" relation="//@relations.6" upper="1"/>
1009 <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@assertions.6" relation="//@relations.7" lower="1"/>
1010 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.7" relation="//@relations.7" upper="1"/>
1011 <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.8" inverseA="//@relations.1" inverseB="//@relations.7"/>
1012 <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.9" inverseA="//@relations.0" inverseB="//@relations.0"/>
1013 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.8" patternFullyQualifiedName="modes3.queries.turnoutInSegments">
1014 <variableTrace targetLogicVariable="//@relations.8/@value/@operands.0/@quantifiedVariables.0"/>
1015 </annotations>
1016 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.9" patternFullyQualifiedName="modes3.queries.unreachable"/>
1017 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.10" patternFullyQualifiedName="modes3.queries.turnout"/>
1018 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.11" patternFullyQualifiedName="modes3.queries.turnoutOutputsAreSame">
1019 <variableTrace targetLogicVariable="//@relations.11/@value/@operands.0/@quantifiedVariables.0"/>
1020 </annotations>
1021 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.12" patternFullyQualifiedName="modes3.queries.extraInputOfTurnout">
1022 <variableTrace targetLogicVariable="//@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
1023 <variableTrace targetLogicVariable="//@relations.12/@value/@operands.0/@quantifiedVariables.1"/>
1024 </annotations>
1025 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.13" patternFullyQualifiedName="modes3.queries.turnoutConnectedToBothOutputs">
1026 <variableTrace targetLogicVariable="//@relations.13/@value/@operands.0/@quantifiedVariables.0"/>
1027 <variableTrace targetLogicVariable="//@relations.13/@value/@operands.0/@quantifiedVariables.1"/>
1028 </annotations>
1029 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.14" patternFullyQualifiedName="modes3.queries.tooManyExtraInputsOfTurnout">
1030 <variableTrace targetLogicVariable="//@relations.14/@value/@operands.0/@quantifiedVariables.0"/>
1031 <variableTrace targetLogicVariable="//@relations.14/@value/@operands.0/@quantifiedVariables.1"/>
1032 </annotations>
1033 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.15" patternFullyQualifiedName="modes3.queries.connectedToReflexive"/>
1034 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.16" patternFullyQualifiedName="modes3.queries.turnoutOutput"/>
1035 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.17" patternFullyQualifiedName="modes3.queries.connectedTo"/>
1036 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.18" patternFullyQualifiedName="modes3.queries.outputReflexive"/>
1037 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.19" patternFullyQualifiedName="modes3.queries.tooManyInputsOfSegment">
1038 <variableTrace targetLogicVariable="//@relations.19/@value/@operands.0/@quantifiedVariables.0"/>
1039 <variableTrace targetLogicVariable="//@relations.19/@value/@operands.0/@quantifiedVariables.1"/>
1040 <variableTrace targetLogicVariable="//@relations.19/@value/@operands.0/@quantifiedVariables.2"/>
1041 </annotations>
1042 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.20" patternFullyQualifiedName="modes3.queries.noExtraInputOfTurnout">
1043 <variableTrace targetLogicVariable="//@relations.20/@value/@operands.0/@quantifiedVariables.0"/>
1044 </annotations>
1045 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.21" patternFullyQualifiedName="modes3.queries.reachable"/>
1046 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.22" patternFullyQualifiedName="modes3.queries.turnoutNotConnectedToOutput">
1047 <variableTrace targetLogicVariable="//@relations.22/@value/@operands.0/@quantifiedVariables.0"/>
1048 <variableTrace targetLogicVariable="//@relations.22/@value/@operands.0/@quantifiedVariables.1"/>
1049 </annotations>
1050 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.23" patternFullyQualifiedName="modes3.queries.adjacent"/>
1051 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.24" patternFullyQualifiedName="modes3.queries.connectedToNotSymmetric"/>
1052 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.25" patternFullyQualifiedName="modes3.queries.output"/>
1053 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@relations.26" patternFullyQualifiedName="modes3.queries.noInputOfSegment">
1054 <variableTrace targetLogicVariable="//@relations.26/@value/@operands.0/@quantifiedVariables.0"/>
1055 </annotations>
1056 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.10" query="//@annotations.10"/>
1057 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.11" query="//@annotations.11"/>
1058 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.12" query="//@annotations.13"/>
1059 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.13" query="//@annotations.15"/>
1060 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.14" query="//@annotations.16"/>
1061 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.15" query="//@annotations.17"/>
1062 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.16" query="//@annotations.20"/>
1063 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.17" query="//@annotations.21"/>
1064 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.18" query="//@annotations.22"/>
1065 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.19" query="//@annotations.24"/>
1066 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.20" query="//@annotations.26"/>
1067 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@assertions.21" query="//@annotations.28"/>
1068</language:LogicProblem>
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.gml b/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.gml
deleted file mode 100644
index 66b57d1a..00000000
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.gml
+++ /dev/null
@@ -1,1191 +0,0 @@
1graph
2[
3 node
4 [
5 id 0
6 graphics
7 [
8 w 269.5
9 h 54
10 type "rectangle"
11 fill "#FFFFFF"
12 fill2 "#FFFFFF"
13 outline "#000000"
14 ]
15 LabelGraphics
16 [
17 text "o 1"
18 outline "#000000"
19 fill "#FFFFFF"
20 fontSize 16
21 fontName "Monospace"
22 autoSizePolicy "node_width"
23 anchor "t"
24 borderDistance 0.0
25 ]
26 LabelGraphics
27 [
28 text "
29 Modes3ModelRoot class DefinedPart
30 Modes3ModelRoot class
31 "
32 fontSize 14
33 fontName "Consolas"
34 alignment "left"
35 anchor "tl"
36 borderDistance 6
37 ]
38 ]
39
40 node
41 [
42 id 1
43 graphics
44 [
45 w 41.800000000000004
46 h 26
47 type "rectangle"
48 fill "#FFFFFF"
49 fill2 "#FFFFFF"
50 outline "#000000"
51 ]
52 LabelGraphics
53 [
54 text "true"
55 outline "#000000"
56 fill "#FFFFFF"
57 fontSize 16
58 fontName "Monospace"
59 autoSizePolicy "node_width"
60 anchor "t"
61 borderDistance 0.0
62 ]
63 LabelGraphics
64 [
65 text "
66 "
67 fontSize 14
68 fontName "Consolas"
69 alignment "left"
70 anchor "tl"
71 borderDistance 6
72 ]
73 ]
74
75 node
76 [
77 id 2
78 graphics
79 [
80 w 50.6
81 h 26
82 type "rectangle"
83 fill "#FFFFFF"
84 fill2 "#FFFFFF"
85 outline "#000000"
86 ]
87 LabelGraphics
88 [
89 text "false"
90 outline "#000000"
91 fill "#FFFFFF"
92 fontSize 16
93 fontName "Monospace"
94 autoSizePolicy "node_width"
95 anchor "t"
96 borderDistance 0.0
97 ]
98 LabelGraphics
99 [
100 text "
101 "
102 fontSize 14
103 fontName "Consolas"
104 alignment "left"
105 anchor "tl"
106 borderDistance 6
107 ]
108 ]
109
110 node
111 [
112 id 3
113 graphics
114 [
115 w 115.50000000000001
116 h 54
117 type "rectangle"
118 fill "#FFFFFF"
119 fill2 "#FFFFFF"
120 outline "#000000"
121 ]
122 LabelGraphics
123 [
124 text "null"
125 outline "#000000"
126 fill "#FFFFFF"
127 fontSize 16
128 fontName "Monospace"
129 autoSizePolicy "node_width"
130 anchor "t"
131 borderDistance 0.0
132 ]
133 LabelGraphics
134 [
135 text "
136 Segment class
137 Turnout class
138 "
139 fontSize 14
140 fontName "Consolas"
141 alignment "left"
142 anchor "tl"
143 borderDistance 6
144 ]
145 ]
146
147 node
148 [
149 id 4
150 graphics
151 [
152 w 100.10000000000001
153 h 40
154 type "rectangle"
155 fill "#FFFFFF"
156 fill2 "#FFFFFF"
157 outline "#000000"
158 ]
159 LabelGraphics
160 [
161 text "null"
162 outline "#000000"
163 fill "#FFFFFF"
164 fontSize 16
165 fontName "Monospace"
166 autoSizePolicy "node_width"
167 anchor "t"
168 borderDistance 0.0
169 ]
170 LabelGraphics
171 [
172 text "
173 Train class
174 "
175 fontSize 14
176 fontName "Consolas"
177 alignment "left"
178 anchor "tl"
179 borderDistance 6
180 ]
181 ]
182
183 node
184 [
185 id 5
186 graphics
187 [
188 w 115.50000000000001
189 h 40
190 type "rectangle"
191 fill "#FFFFFF"
192 fill2 "#FFFFFF"
193 outline "#000000"
194 ]
195 LabelGraphics
196 [
197 text "null"
198 outline "#000000"
199 fill "#FFFFFF"
200 fontSize 16
201 fontName "Monospace"
202 autoSizePolicy "node_width"
203 anchor "t"
204 borderDistance 0.0
205 ]
206 LabelGraphics
207 [
208 text "
209 Segment class
210 "
211 fontSize 14
212 fontName "Consolas"
213 alignment "left"
214 anchor "tl"
215 borderDistance 6
216 ]
217 ]
218
219 node
220 [
221 id 6
222 graphics
223 [
224 w 100.10000000000001
225 h 40
226 type "rectangle"
227 fill "#FFFFFF"
228 fill2 "#FFFFFF"
229 outline "#000000"
230 ]
231 LabelGraphics
232 [
233 text "null"
234 outline "#000000"
235 fill "#FFFFFF"
236 fontSize 16
237 fontName "Monospace"
238 autoSizePolicy "node_width"
239 anchor "t"
240 borderDistance 0.0
241 ]
242 LabelGraphics
243 [
244 text "
245 Train class
246 "
247 fontSize 14
248 fontName "Consolas"
249 alignment "left"
250 anchor "tl"
251 borderDistance 6
252 ]
253 ]
254
255 node
256 [
257 id 7
258 graphics
259 [
260 w 115.50000000000001
261 h 40
262 type "rectangle"
263 fill "#FFFFFF"
264 fill2 "#FFFFFF"
265 outline "#000000"
266 ]
267 LabelGraphics
268 [
269 text "null"
270 outline "#000000"
271 fill "#FFFFFF"
272 fontSize 16
273 fontName "Monospace"
274 autoSizePolicy "node_width"
275 anchor "t"
276 borderDistance 0.0
277 ]
278 LabelGraphics
279 [
280 text "
281 Segment class
282 "
283 fontSize 14
284 fontName "Consolas"
285 alignment "left"
286 anchor "tl"
287 borderDistance 6
288 ]
289 ]
290
291 node
292 [
293 id 8
294 graphics
295 [
296 w 100.10000000000001
297 h 40
298 type "rectangle"
299 fill "#FFFFFF"
300 fill2 "#FFFFFF"
301 outline "#000000"
302 ]
303 LabelGraphics
304 [
305 text "null"
306 outline "#000000"
307 fill "#FFFFFF"
308 fontSize 16
309 fontName "Monospace"
310 autoSizePolicy "node_width"
311 anchor "t"
312 borderDistance 0.0
313 ]
314 LabelGraphics
315 [
316 text "
317 Train class
318 "
319 fontSize 14
320 fontName "Consolas"
321 alignment "left"
322 anchor "tl"
323 borderDistance 6
324 ]
325 ]
326
327 node
328 [
329 id 9
330 graphics
331 [
332 w 115.50000000000001
333 h 40
334 type "rectangle"
335 fill "#FFFFFF"
336 fill2 "#FFFFFF"
337 outline "#000000"
338 ]
339 LabelGraphics
340 [
341 text "null"
342 outline "#000000"
343 fill "#FFFFFF"
344 fontSize 16
345 fontName "Monospace"
346 autoSizePolicy "node_width"
347 anchor "t"
348 borderDistance 0.0
349 ]
350 LabelGraphics
351 [
352 text "
353 Segment class
354 "
355 fontSize 14
356 fontName "Consolas"
357 alignment "left"
358 anchor "tl"
359 borderDistance 6
360 ]
361 ]
362
363 node
364 [
365 id 10
366 graphics
367 [
368 w 100.10000000000001
369 h 40
370 type "rectangle"
371 fill "#FFFFFF"
372 fill2 "#FFFFFF"
373 outline "#000000"
374 ]
375 LabelGraphics
376 [
377 text "null"
378 outline "#000000"
379 fill "#FFFFFF"
380 fontSize 16
381 fontName "Monospace"
382 autoSizePolicy "node_width"
383 anchor "t"
384 borderDistance 0.0
385 ]
386 LabelGraphics
387 [
388 text "
389 Train class
390 "
391 fontSize 14
392 fontName "Consolas"
393 alignment "left"
394 anchor "tl"
395 borderDistance 6
396 ]
397 ]
398
399 node
400 [
401 id 11
402 graphics
403 [
404 w 115.50000000000001
405 h 40
406 type "rectangle"
407 fill "#FFFFFF"
408 fill2 "#FFFFFF"
409 outline "#000000"
410 ]
411 LabelGraphics
412 [
413 text "null"
414 outline "#000000"
415 fill "#FFFFFF"
416 fontSize 16
417 fontName "Monospace"
418 autoSizePolicy "node_width"
419 anchor "t"
420 borderDistance 0.0
421 ]
422 LabelGraphics
423 [
424 text "
425 Segment class
426 "
427 fontSize 14
428 fontName "Consolas"
429 alignment "left"
430 anchor "tl"
431 borderDistance 6
432 ]
433 ]
434
435 node
436 [
437 id 12
438 graphics
439 [
440 w 100.10000000000001
441 h 40
442 type "rectangle"
443 fill "#FFFFFF"
444 fill2 "#FFFFFF"
445 outline "#000000"
446 ]
447 LabelGraphics
448 [
449 text "null"
450 outline "#000000"
451 fill "#FFFFFF"
452 fontSize 16
453 fontName "Monospace"
454 autoSizePolicy "node_width"
455 anchor "t"
456 borderDistance 0.0
457 ]
458 LabelGraphics
459 [
460 text "
461 Train class
462 "
463 fontSize 14
464 fontName "Consolas"
465 alignment "left"
466 anchor "tl"
467 borderDistance 6
468 ]
469 ]
470
471 node
472 [
473 id 13
474 graphics
475 [
476 w 15.400000000000002
477 h 26
478 type "rectangle"
479 fill "#FFFFFF"
480 fill2 "#FFFFFF"
481 outline "#000000"
482 ]
483 LabelGraphics
484 [
485 text "?"
486 outline "#000000"
487 fill "#FFFFFF"
488 fontSize 16
489 fontName "Monospace"
490 autoSizePolicy "node_width"
491 anchor "t"
492 borderDistance 0.0
493 ]
494 LabelGraphics
495 [
496 text "
497 "
498 fontSize 14
499 fontName "Consolas"
500 alignment "left"
501 anchor "tl"
502 borderDistance 6
503 ]
504 ]
505
506 node
507 [
508 id 14
509 graphics
510 [
511 w 15.400000000000002
512 h 26
513 type "rectangle"
514 fill "#FFFFFF"
515 fill2 "#FFFFFF"
516 outline "#000000"
517 ]
518 LabelGraphics
519 [
520 text "?"
521 outline "#000000"
522 fill "#FFFFFF"
523 fontSize 16
524 fontName "Monospace"
525 autoSizePolicy "node_width"
526 anchor "t"
527 borderDistance 0.0
528 ]
529 LabelGraphics
530 [
531 text "
532 "
533 fontSize 14
534 fontName "Consolas"
535 alignment "left"
536 anchor "tl"
537 borderDistance 6
538 ]
539 ]
540
541 node
542 [
543 id 15
544 graphics
545 [
546 w 15.400000000000002
547 h 26
548 type "rectangle"
549 fill "#FFFFFF"
550 fill2 "#FFFFFF"
551 outline "#000000"
552 ]
553 LabelGraphics
554 [
555 text "?"
556 outline "#000000"
557 fill "#FFFFFF"
558 fontSize 16
559 fontName "Monospace"
560 autoSizePolicy "node_width"
561 anchor "t"
562 borderDistance 0.0
563 ]
564 LabelGraphics
565 [
566 text "
567 "
568 fontSize 14
569 fontName "Consolas"
570 alignment "left"
571 anchor "tl"
572 borderDistance 6
573 ]
574 ]
575
576 node
577 [
578 id 16
579 graphics
580 [
581 w 103.4
582 h 26
583 type "rectangle"
584 fill "#FFFFFF"
585 fill2 "#FFFFFF"
586 outline "#000000"
587 ]
588 LabelGraphics
589 [
590 text "New Objects"
591 outline "#000000"
592 fill "#FFFFFF"
593 fontSize 16
594 fontName "Monospace"
595 autoSizePolicy "node_width"
596 anchor "t"
597 borderDistance 0.0
598 ]
599 LabelGraphics
600 [
601 text "
602 "
603 fontSize 14
604 fontName "Consolas"
605 alignment "left"
606 anchor "tl"
607 borderDistance 6
608 ]
609 ]
610 edge
611 [
612 source 5
613 target 3
614 graphics
615 [
616 fill "#000000"
617 targetArrow "standard"
618 ]
619 LabelGraphics
620 [
621 text "connectedTo reference Segment"
622 fontSize 14
623 fontName "Consolas"
624 configuration "AutoFlippingLabel"
625 model "six_pos"
626 position "thead"
627 ]
628 ]
629 edge
630 [
631 source 3
632 target 5
633 graphics
634 [
635 fill "#000000"
636 targetArrow "standard"
637 ]
638 LabelGraphics
639 [
640 text "connectedTo reference Segment"
641 fontSize 14
642 fontName "Consolas"
643 configuration "AutoFlippingLabel"
644 model "six_pos"
645 position "thead"
646 ]
647 ]
648 edge
649 [
650 source 7
651 target 3
652 graphics
653 [
654 fill "#000000"
655 targetArrow "standard"
656 ]
657 LabelGraphics
658 [
659 text "connectedTo reference Segment"
660 fontSize 14
661 fontName "Consolas"
662 configuration "AutoFlippingLabel"
663 model "six_pos"
664 position "thead"
665 ]
666 ]
667 edge
668 [
669 source 3
670 target 7
671 graphics
672 [
673 fill "#000000"
674 targetArrow "standard"
675 ]
676 LabelGraphics
677 [
678 text "connectedTo reference Segment"
679 fontSize 14
680 fontName "Consolas"
681 configuration "AutoFlippingLabel"
682 model "six_pos"
683 position "thead"
684 ]
685 ]
686 edge
687 [
688 source 7
689 target 9
690 graphics
691 [
692 fill "#000000"
693 targetArrow "standard"
694 ]
695 LabelGraphics
696 [
697 text "connectedTo reference Segment"
698 fontSize 14
699 fontName "Consolas"
700 configuration "AutoFlippingLabel"
701 model "six_pos"
702 position "thead"
703 ]
704 ]
705 edge
706 [
707 source 9
708 target 7
709 graphics
710 [
711 fill "#000000"
712 targetArrow "standard"
713 ]
714 LabelGraphics
715 [
716 text "connectedTo reference Segment"
717 fontSize 14
718 fontName "Consolas"
719 configuration "AutoFlippingLabel"
720 model "six_pos"
721 position "thead"
722 ]
723 ]
724 edge
725 [
726 source 11
727 target 5
728 graphics
729 [
730 fill "#000000"
731 targetArrow "standard"
732 ]
733 LabelGraphics
734 [
735 text "connectedTo reference Segment"
736 fontSize 14
737 fontName "Consolas"
738 configuration "AutoFlippingLabel"
739 model "six_pos"
740 position "thead"
741 ]
742 ]
743 edge
744 [
745 source 5
746 target 11
747 graphics
748 [
749 fill "#000000"
750 targetArrow "standard"
751 ]
752 LabelGraphics
753 [
754 text "connectedTo reference Segment"
755 fontSize 14
756 fontName "Consolas"
757 configuration "AutoFlippingLabel"
758 model "six_pos"
759 position "thead"
760 ]
761 ]
762 edge
763 [
764 source 5
765 target 6
766 graphics
767 [
768 fill "#000000"
769 targetArrow "standard"
770 ]
771 LabelGraphics
772 [
773 text "occupiedBy reference Segment"
774 fontSize 14
775 fontName "Consolas"
776 configuration "AutoFlippingLabel"
777 model "six_pos"
778 position "thead"
779 ]
780 ]
781 edge
782 [
783 source 3
784 target 4
785 graphics
786 [
787 fill "#000000"
788 targetArrow "standard"
789 ]
790 LabelGraphics
791 [
792 text "occupiedBy reference Segment"
793 fontSize 14
794 fontName "Consolas"
795 configuration "AutoFlippingLabel"
796 model "six_pos"
797 position "thead"
798 ]
799 ]
800 edge
801 [
802 source 7
803 target 8
804 graphics
805 [
806 fill "#000000"
807 targetArrow "standard"
808 ]
809 LabelGraphics
810 [
811 text "occupiedBy reference Segment"
812 fontSize 14
813 fontName "Consolas"
814 configuration "AutoFlippingLabel"
815 model "six_pos"
816 position "thead"
817 ]
818 ]
819 edge
820 [
821 source 9
822 target 10
823 graphics
824 [
825 fill "#000000"
826 targetArrow "standard"
827 ]
828 LabelGraphics
829 [
830 text "occupiedBy reference Segment"
831 fontSize 14
832 fontName "Consolas"
833 configuration "AutoFlippingLabel"
834 model "six_pos"
835 position "thead"
836 ]
837 ]
838 edge
839 [
840 source 11
841 target 12
842 graphics
843 [
844 fill "#000000"
845 targetArrow "standard"
846 ]
847 LabelGraphics
848 [
849 text "occupiedBy reference Segment"
850 fontSize 14
851 fontName "Consolas"
852 configuration "AutoFlippingLabel"
853 model "six_pos"
854 position "thead"
855 ]
856 ]
857 edge
858 [
859 source 0
860 target 4
861 graphics
862 [
863 fill "#000000"
864 width 3
865 targetArrow "standard"
866 ]
867 LabelGraphics
868 [
869 text "trains reference Modes3ModelRoot"
870 fontSize 14
871 fontName "Consolas"
872 configuration "AutoFlippingLabel"
873 model "six_pos"
874 position "thead"
875 ]
876 ]
877 edge
878 [
879 source 0
880 target 6
881 graphics
882 [
883 fill "#000000"
884 width 3
885 targetArrow "standard"
886 ]
887 LabelGraphics
888 [
889 text "trains reference Modes3ModelRoot"
890 fontSize 14
891 fontName "Consolas"
892 configuration "AutoFlippingLabel"
893 model "six_pos"
894 position "thead"
895 ]
896 ]
897 edge
898 [
899 source 0
900 target 8
901 graphics
902 [
903 fill "#000000"
904 width 3
905 targetArrow "standard"
906 ]
907 LabelGraphics
908 [
909 text "trains reference Modes3ModelRoot"
910 fontSize 14
911 fontName "Consolas"
912 configuration "AutoFlippingLabel"
913 model "six_pos"
914 position "thead"
915 ]
916 ]
917 edge
918 [
919 source 0
920 target 10
921 graphics
922 [
923 fill "#000000"
924 width 3
925 targetArrow "standard"
926 ]
927 LabelGraphics
928 [
929 text "trains reference Modes3ModelRoot"
930 fontSize 14
931 fontName "Consolas"
932 configuration "AutoFlippingLabel"
933 model "six_pos"
934 position "thead"
935 ]
936 ]
937 edge
938 [
939 source 0
940 target 12
941 graphics
942 [
943 fill "#000000"
944 width 3
945 targetArrow "standard"
946 ]
947 LabelGraphics
948 [
949 text "trains reference Modes3ModelRoot"
950 fontSize 14
951 fontName "Consolas"
952 configuration "AutoFlippingLabel"
953 model "six_pos"
954 position "thead"
955 ]
956 ]
957 edge
958 [
959 source 0
960 target 5
961 graphics
962 [
963 fill "#000000"
964 width 3
965 targetArrow "standard"
966 ]
967 LabelGraphics
968 [
969 text "segments reference Modes3ModelRoot"
970 fontSize 14
971 fontName "Consolas"
972 configuration "AutoFlippingLabel"
973 model "six_pos"
974 position "thead"
975 ]
976 ]
977 edge
978 [
979 source 0
980 target 7
981 graphics
982 [
983 fill "#000000"
984 width 3
985 targetArrow "standard"
986 ]
987 LabelGraphics
988 [
989 text "segments reference Modes3ModelRoot"
990 fontSize 14
991 fontName "Consolas"
992 configuration "AutoFlippingLabel"
993 model "six_pos"
994 position "thead"
995 ]
996 ]
997 edge
998 [
999 source 0
1000 target 9
1001 graphics
1002 [
1003 fill "#000000"
1004 width 3
1005 targetArrow "standard"
1006 ]
1007 LabelGraphics
1008 [
1009 text "segments reference Modes3ModelRoot"
1010 fontSize 14
1011 fontName "Consolas"
1012 configuration "AutoFlippingLabel"
1013 model "six_pos"
1014 position "thead"
1015 ]
1016 ]
1017 edge
1018 [
1019 source 0
1020 target 11
1021 graphics
1022 [
1023 fill "#000000"
1024 width 3
1025 targetArrow "standard"
1026 ]
1027 LabelGraphics
1028 [
1029 text "segments reference Modes3ModelRoot"
1030 fontSize 14
1031 fontName "Consolas"
1032 configuration "AutoFlippingLabel"
1033 model "six_pos"
1034 position "thead"
1035 ]
1036 ]
1037 edge
1038 [
1039 source 0
1040 target 3
1041 graphics
1042 [
1043 fill "#000000"
1044 width 3
1045 targetArrow "standard"
1046 ]
1047 LabelGraphics
1048 [
1049 text "turnouts reference Modes3ModelRoot"
1050 fontSize 14
1051 fontName "Consolas"
1052 configuration "AutoFlippingLabel"
1053 model "six_pos"
1054 position "thead"
1055 ]
1056 ]
1057 edge
1058 [
1059 source 3
1060 target 9
1061 graphics
1062 [
1063 fill "#000000"
1064 targetArrow "standard"
1065 ]
1066 LabelGraphics
1067 [
1068 text "straight reference Turnout"
1069 fontSize 14
1070 fontName "Consolas"
1071 configuration "AutoFlippingLabel"
1072 model "six_pos"
1073 position "thead"
1074 ]
1075 ]
1076 edge
1077 [
1078 source 3
1079 target 5
1080 graphics
1081 [
1082 fill "#000000"
1083 targetArrow "standard"
1084 ]
1085 LabelGraphics
1086 [
1087 text "divergent reference Turnout"
1088 fontSize 14
1089 fontName "Consolas"
1090 configuration "AutoFlippingLabel"
1091 model "six_pos"
1092 position "thead"
1093 ]
1094 ]
1095 edge
1096 [
1097 source 6
1098 target 5
1099 graphics
1100 [
1101 fill "#000000"
1102 targetArrow "standard"
1103 ]
1104 LabelGraphics
1105 [
1106 text "location reference Train"
1107 fontSize 14
1108 fontName "Consolas"
1109 configuration "AutoFlippingLabel"
1110 model "six_pos"
1111 position "thead"
1112 ]
1113 ]
1114 edge
1115 [
1116 source 4
1117 target 3
1118 graphics
1119 [
1120 fill "#000000"
1121 targetArrow "standard"
1122 ]
1123 LabelGraphics
1124 [
1125 text "location reference Train"
1126 fontSize 14
1127 fontName "Consolas"
1128 configuration "AutoFlippingLabel"
1129 model "six_pos"
1130 position "thead"
1131 ]
1132 ]
1133 edge
1134 [
1135 source 8
1136 target 7
1137 graphics
1138 [
1139 fill "#000000"
1140 targetArrow "standard"
1141 ]
1142 LabelGraphics
1143 [
1144 text "location reference Train"
1145 fontSize 14
1146 fontName "Consolas"
1147 configuration "AutoFlippingLabel"
1148 model "six_pos"
1149 position "thead"
1150 ]
1151 ]
1152 edge
1153 [
1154 source 10
1155 target 9
1156 graphics
1157 [
1158 fill "#000000"
1159 targetArrow "standard"
1160 ]
1161 LabelGraphics
1162 [
1163 text "location reference Train"
1164 fontSize 14
1165 fontName "Consolas"
1166 configuration "AutoFlippingLabel"
1167 model "six_pos"
1168 position "thead"
1169 ]
1170 ]
1171 edge
1172 [
1173 source 12
1174 target 11
1175 graphics
1176 [
1177 fill "#000000"
1178 targetArrow "standard"
1179 ]
1180 LabelGraphics
1181 [
1182 text "location reference Train"
1183 fontSize 14
1184 fontName "Consolas"
1185 configuration "AutoFlippingLabel"
1186 model "six_pos"
1187 position "thead"
1188 ]
1189 ]
1190]
1191
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.partialinterpretation b/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.partialinterpretation
deleted file mode 100644
index 8b50e17f..00000000
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.partialinterpretation
+++ /dev/null
@@ -1,1037 +0,0 @@
1<?xml version="1.0" encoding="ASCII"?>
2<partialinterpretation:PartialInterpretation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore2logicannotations="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/ecore2logicannotation" xmlns:language="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" xmlns:partialinterpretation="http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" xmlns:viatra2logicannotations="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/viatra2logicannotation" problem="//@problemConainer" maxNewElements="0">
3 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.0" param1="//@problemConainer/@relations.0/@parameters.0" param2="//@problemConainer/@relations.0/@parameters.1">
4 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.4" param2="//@newElements.2"/>
5 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.2" param2="//@newElements.4"/>
6 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.6" param2="//@newElements.2"/>
7 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.2" param2="//@newElements.6"/>
8 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.6" param2="//@newElements.8"/>
9 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.8" param2="//@newElements.6"/>
10 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.10" param2="//@newElements.4"/>
11 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.4" param2="//@newElements.10"/>
12 </partialrelationinterpretation>
13 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.1" param1="//@problemConainer/@relations.1/@parameters.0" param2="//@problemConainer/@relations.1/@parameters.1">
14 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.4" param2="//@newElements.5"/>
15 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.2" param2="//@newElements.3"/>
16 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.6" param2="//@newElements.7"/>
17 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.8" param2="//@newElements.9"/>
18 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.10" param2="//@newElements.11"/>
19 </partialrelationinterpretation>
20 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.2" param1="//@problemConainer/@relations.2/@parameters.0" param2="//@problemConainer/@relations.2/@parameters.1">
21 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.3"/>
22 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.5"/>
23 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.7"/>
24 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.9"/>
25 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.11"/>
26 </partialrelationinterpretation>
27 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.3" param1="//@problemConainer/@relations.3/@parameters.0" param2="//@problemConainer/@relations.3/@parameters.1">
28 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.4"/>
29 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.6"/>
30 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.8"/>
31 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.10"/>
32 </partialrelationinterpretation>
33 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.4" param1="//@problemConainer/@relations.4/@parameters.0" param2="//@problemConainer/@relations.4/@parameters.1">
34 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@problemConainer/@elements.0" param2="//@newElements.2"/>
35 </partialrelationinterpretation>
36 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.5" param1="//@problemConainer/@relations.5/@parameters.0" param2="//@problemConainer/@relations.5/@parameters.1">
37 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.2" param2="//@newElements.8"/>
38 </partialrelationinterpretation>
39 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.6" param1="//@problemConainer/@relations.6/@parameters.0" param2="//@problemConainer/@relations.6/@parameters.1">
40 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.2" param2="//@newElements.4"/>
41 </partialrelationinterpretation>
42 <partialrelationinterpretation interpretationOf="//@problemConainer/@relations.7" param1="//@problemConainer/@relations.7/@parameters.0" param2="//@problemConainer/@relations.7/@parameters.1">
43 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.5" param2="//@newElements.4"/>
44 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.3" param2="//@newElements.2"/>
45 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.7" param2="//@newElements.6"/>
46 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.9" param2="//@newElements.8"/>
47 <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param1="//@newElements.11" param2="//@newElements.10"/>
48 </partialrelationinterpretation>
49 <newElements xsi:type="partialinterpretation:BooleanElement" name="true" valueSet="true" value="true"/>
50 <newElements xsi:type="partialinterpretation:BooleanElement" name="false" valueSet="true"/>
51 <newElements/>
52 <newElements/>
53 <newElements/>
54 <newElements/>
55 <newElements/>
56 <newElements/>
57 <newElements/>
58 <newElements/>
59 <newElements/>
60 <newElements/>
61 <partialtypeinterpratation xsi:type="partialinterpretation:PartialBooleanInterpretation" elements="//@newElements.0 //@newElements.1"/>
62 <partialtypeinterpratation xsi:type="partialinterpretation:PartialIntegerInterpretation" elements="//@openWorldElements.0"/>
63 <partialtypeinterpratation xsi:type="partialinterpretation:PartialRealInterpretation" elements="//@openWorldElements.1"/>
64 <partialtypeinterpratation xsi:type="partialinterpretation:PartialStringInterpretation" elements="//@openWorldElements.2"/>
65 <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" elements="//@newElements.2 //@newElements.4 //@newElements.6 //@newElements.8 //@newElements.10" scopes="//@scopes.0" interpretationOf="//@problemConainer/@types.0"/>
66 <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" elements="//@problemConainer/@elements.0" scopes="//@scopes.1" interpretationOf="//@problemConainer/@types.1"/>
67 <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" elements="//@newElements.2" scopes="//@scopes.2" supertypeInterpretation="//@partialtypeinterpratation.4" interpretationOf="//@problemConainer/@types.2"/>
68 <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" elements="//@newElements.3 //@newElements.5 //@newElements.7 //@newElements.9 //@newElements.11" scopes="//@scopes.3" interpretationOf="//@problemConainer/@types.3"/>
69 <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.4" supertypeInterpretation="//@partialtypeinterpratation.5" interpretationOf="//@problemConainer/@types.5"/>
70 <openWorldElements xsi:type="partialinterpretation:IntegerElement" name="New Integers"/>
71 <openWorldElements xsi:type="partialinterpretation:RealElement" name="New Reals"/>
72 <openWorldElements xsi:type="partialinterpretation:StringElement" name="New Strings"/>
73 <openWorldElements name="New Objects"/>
74 <problemConainer>
75 <types xsi:type="language:TypeDeclaration" name="Segment class" subtypes="//@problemConainer/@types.2"/>
76 <types xsi:type="language:TypeDeclaration" name="Modes3ModelRoot class" subtypes="//@problemConainer/@types.4 //@problemConainer/@types.5" isAbstract="true"/>
77 <types xsi:type="language:TypeDeclaration" name="Turnout class" supertypes="//@problemConainer/@types.0"/>
78 <types xsi:type="language:TypeDeclaration" name="Train class"/>
79 <types xsi:type="language:TypeDefinition" name="Modes3ModelRoot class DefinedPart" supertypes="//@problemConainer/@types.1" elements="//@problemConainer/@elements.0"/>
80 <types xsi:type="language:TypeDeclaration" name="Modes3ModelRoot class UndefinedPart" supertypes="//@problemConainer/@types.1"/>
81 <assertions name="upperMultiplicity connectedTo Segment" annotations="//@problemConainer/@annotations.0">
82 <value xsi:type="language:Forall">
83 <quantifiedVariables name="src">
84 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
85 </quantifiedVariables>
86 <quantifiedVariables name="trg 1">
87 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
88 </quantifiedVariables>
89 <quantifiedVariables name="trg 2">
90 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
91 </quantifiedVariables>
92 <quantifiedVariables name="trg 3">
93 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
94 </quantifiedVariables>
95 <expression xsi:type="language:Impl">
96 <leftOperand xsi:type="language:And">
97 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
98 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.0"/>
99 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.1"/>
100 </operands>
101 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
102 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.0"/>
103 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.2"/>
104 </operands>
105 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
106 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.0"/>
107 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.3"/>
108 </operands>
109 </leftOperand>
110 <rightOperand xsi:type="language:Not">
111 <operand xsi:type="language:Distinct">
112 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.1"/>
113 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.2"/>
114 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.0/@value/@quantifiedVariables.3"/>
115 </operand>
116 </rightOperand>
117 </expression>
118 </value>
119 </assertions>
120 <assertions name="upperMultiplicity occupiedBy Segment" annotations="//@problemConainer/@annotations.1">
121 <value xsi:type="language:Forall">
122 <quantifiedVariables name="src">
123 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
124 </quantifiedVariables>
125 <quantifiedVariables name="trg 1">
126 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
127 </quantifiedVariables>
128 <quantifiedVariables name="trg 2">
129 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
130 </quantifiedVariables>
131 <expression xsi:type="language:Impl">
132 <leftOperand xsi:type="language:And">
133 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.1">
134 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.1/@value/@quantifiedVariables.0"/>
135 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.1/@value/@quantifiedVariables.1"/>
136 </operands>
137 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.1">
138 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.1/@value/@quantifiedVariables.0"/>
139 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.1/@value/@quantifiedVariables.2"/>
140 </operands>
141 </leftOperand>
142 <rightOperand xsi:type="language:Not">
143 <operand xsi:type="language:Distinct">
144 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.1/@value/@quantifiedVariables.1"/>
145 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.1/@value/@quantifiedVariables.2"/>
146 </operand>
147 </rightOperand>
148 </expression>
149 </value>
150 </assertions>
151 <assertions name="lowerMultiplicity straight Turnout" annotations="//@problemConainer/@annotations.2">
152 <value xsi:type="language:Forall">
153 <quantifiedVariables name="src">
154 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
155 </quantifiedVariables>
156 <expression xsi:type="language:Exists">
157 <quantifiedVariables name="trg 1">
158 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
159 </quantifiedVariables>
160 <expression xsi:type="language:And">
161 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.5">
162 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.2/@value/@quantifiedVariables.0"/>
163 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.2/@value/@expression/@quantifiedVariables.0"/>
164 </operands>
165 </expression>
166 </expression>
167 </value>
168 </assertions>
169 <assertions name="upperMultiplicity straight Turnout" annotations="//@problemConainer/@annotations.3">
170 <value xsi:type="language:Forall">
171 <quantifiedVariables name="src">
172 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
173 </quantifiedVariables>
174 <quantifiedVariables name="trg 1">
175 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
176 </quantifiedVariables>
177 <quantifiedVariables name="trg 2">
178 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
179 </quantifiedVariables>
180 <expression xsi:type="language:Impl">
181 <leftOperand xsi:type="language:And">
182 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.5">
183 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.3/@value/@quantifiedVariables.0"/>
184 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.3/@value/@quantifiedVariables.1"/>
185 </operands>
186 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.5">
187 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.3/@value/@quantifiedVariables.0"/>
188 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.3/@value/@quantifiedVariables.2"/>
189 </operands>
190 </leftOperand>
191 <rightOperand xsi:type="language:Not">
192 <operand xsi:type="language:Distinct">
193 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.3/@value/@quantifiedVariables.1"/>
194 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.3/@value/@quantifiedVariables.2"/>
195 </operand>
196 </rightOperand>
197 </expression>
198 </value>
199 </assertions>
200 <assertions name="lowerMultiplicity divergent Turnout" annotations="//@problemConainer/@annotations.4">
201 <value xsi:type="language:Forall">
202 <quantifiedVariables name="src">
203 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
204 </quantifiedVariables>
205 <expression xsi:type="language:Exists">
206 <quantifiedVariables name="trg 1">
207 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
208 </quantifiedVariables>
209 <expression xsi:type="language:And">
210 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.6">
211 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.4/@value/@quantifiedVariables.0"/>
212 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.4/@value/@expression/@quantifiedVariables.0"/>
213 </operands>
214 </expression>
215 </expression>
216 </value>
217 </assertions>
218 <assertions name="upperMultiplicity divergent Turnout" annotations="//@problemConainer/@annotations.5">
219 <value xsi:type="language:Forall">
220 <quantifiedVariables name="src">
221 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
222 </quantifiedVariables>
223 <quantifiedVariables name="trg 1">
224 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
225 </quantifiedVariables>
226 <quantifiedVariables name="trg 2">
227 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
228 </quantifiedVariables>
229 <expression xsi:type="language:Impl">
230 <leftOperand xsi:type="language:And">
231 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.6">
232 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.5/@value/@quantifiedVariables.0"/>
233 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.5/@value/@quantifiedVariables.1"/>
234 </operands>
235 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.6">
236 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.5/@value/@quantifiedVariables.0"/>
237 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.5/@value/@quantifiedVariables.2"/>
238 </operands>
239 </leftOperand>
240 <rightOperand xsi:type="language:Not">
241 <operand xsi:type="language:Distinct">
242 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.5/@value/@quantifiedVariables.1"/>
243 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.5/@value/@quantifiedVariables.2"/>
244 </operand>
245 </rightOperand>
246 </expression>
247 </value>
248 </assertions>
249 <assertions name="lowerMultiplicity location Train" annotations="//@problemConainer/@annotations.6">
250 <value xsi:type="language:Forall">
251 <quantifiedVariables name="src">
252 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
253 </quantifiedVariables>
254 <expression xsi:type="language:Exists">
255 <quantifiedVariables name="trg 1">
256 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
257 </quantifiedVariables>
258 <expression xsi:type="language:And">
259 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.7">
260 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.6/@value/@quantifiedVariables.0"/>
261 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.6/@value/@expression/@quantifiedVariables.0"/>
262 </operands>
263 </expression>
264 </expression>
265 </value>
266 </assertions>
267 <assertions name="upperMultiplicity location Train" annotations="//@problemConainer/@annotations.7">
268 <value xsi:type="language:Forall">
269 <quantifiedVariables name="src">
270 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
271 </quantifiedVariables>
272 <quantifiedVariables name="trg 1">
273 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
274 </quantifiedVariables>
275 <quantifiedVariables name="trg 2">
276 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
277 </quantifiedVariables>
278 <expression xsi:type="language:Impl">
279 <leftOperand xsi:type="language:And">
280 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.7">
281 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.7/@value/@quantifiedVariables.0"/>
282 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.7/@value/@quantifiedVariables.1"/>
283 </operands>
284 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.7">
285 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.7/@value/@quantifiedVariables.0"/>
286 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.7/@value/@quantifiedVariables.2"/>
287 </operands>
288 </leftOperand>
289 <rightOperand xsi:type="language:Not">
290 <operand xsi:type="language:Distinct">
291 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.7/@value/@quantifiedVariables.1"/>
292 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.7/@value/@quantifiedVariables.2"/>
293 </operand>
294 </rightOperand>
295 </expression>
296 </value>
297 </assertions>
298 <assertions name="oppositeReference occupiedBy Segment" annotations="//@problemConainer/@annotations.8">
299 <value xsi:type="language:Forall">
300 <quantifiedVariables name="src">
301 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
302 </quantifiedVariables>
303 <quantifiedVariables name="trg">
304 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
305 </quantifiedVariables>
306 <expression xsi:type="language:Iff">
307 <leftOperand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.1">
308 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.8/@value/@quantifiedVariables.0"/>
309 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.8/@value/@quantifiedVariables.1"/>
310 </leftOperand>
311 <rightOperand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.7">
312 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.8/@value/@quantifiedVariables.1"/>
313 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.8/@value/@quantifiedVariables.0"/>
314 </rightOperand>
315 </expression>
316 </value>
317 </assertions>
318 <assertions name="oppositeReference connectedTo reference Segment connectedTo reference Segment" annotations="//@problemConainer/@annotations.9">
319 <value xsi:type="language:Forall">
320 <quantifiedVariables name="src">
321 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
322 </quantifiedVariables>
323 <quantifiedVariables name="trg">
324 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
325 </quantifiedVariables>
326 <expression xsi:type="language:Iff">
327 <leftOperand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
328 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.9/@value/@quantifiedVariables.0"/>
329 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.9/@value/@quantifiedVariables.1"/>
330 </leftOperand>
331 <rightOperand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
332 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.9/@value/@quantifiedVariables.1"/>
333 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.9/@value/@quantifiedVariables.0"/>
334 </rightOperand>
335 </expression>
336 </value>
337 </assertions>
338 <assertions name="errorpattern modes3 queries turnoutInSegments" annotations="//@problemConainer/@annotations.27">
339 <value xsi:type="language:Forall">
340 <quantifiedVariables name="p0">
341 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
342 </quantifiedVariables>
343 <expression xsi:type="language:Not">
344 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.8">
345 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.10/@value/@quantifiedVariables.0"/>
346 </operand>
347 </expression>
348 </value>
349 </assertions>
350 <assertions name="errorpattern modes3 queries tooManyInputsOfSegment" annotations="//@problemConainer/@annotations.28">
351 <value xsi:type="language:Forall">
352 <quantifiedVariables name="p0">
353 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
354 </quantifiedVariables>
355 <expression xsi:type="language:Not">
356 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9">
357 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.11/@value/@quantifiedVariables.0"/>
358 </operand>
359 </expression>
360 </value>
361 </assertions>
362 <assertions name="errorpattern modes3 queries turnoutConnectedToBothOutputs" annotations="//@problemConainer/@annotations.29">
363 <value xsi:type="language:Forall">
364 <quantifiedVariables name="p0">
365 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
366 </quantifiedVariables>
367 <expression xsi:type="language:Not">
368 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10">
369 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.12/@value/@quantifiedVariables.0"/>
370 </operand>
371 </expression>
372 </value>
373 </assertions>
374 <assertions name="errorpattern modes3 queries turnoutOutputsAreSame" annotations="//@problemConainer/@annotations.30">
375 <value xsi:type="language:Forall">
376 <quantifiedVariables name="p0">
377 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
378 </quantifiedVariables>
379 <expression xsi:type="language:Not">
380 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.12">
381 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.13/@value/@quantifiedVariables.0"/>
382 </operand>
383 </expression>
384 </value>
385 </assertions>
386 <assertions name="errorpattern modes3 queries tooManyExtraInputsOfTurnout" annotations="//@problemConainer/@annotations.31">
387 <value xsi:type="language:Forall">
388 <quantifiedVariables name="p0">
389 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
390 </quantifiedVariables>
391 <expression xsi:type="language:Not">
392 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.13">
393 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.14/@value/@quantifiedVariables.0"/>
394 </operand>
395 </expression>
396 </value>
397 </assertions>
398 <assertions name="errorpattern modes3 queries unreachable" annotations="//@problemConainer/@annotations.32">
399 <value xsi:type="language:Forall">
400 <quantifiedVariables name="p0">
401 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
402 </quantifiedVariables>
403 <quantifiedVariables name="p1">
404 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
405 </quantifiedVariables>
406 <expression xsi:type="language:Not">
407 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.14">
408 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.15/@value/@quantifiedVariables.0"/>
409 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.15/@value/@quantifiedVariables.1"/>
410 </operand>
411 </expression>
412 </value>
413 </assertions>
414 <assertions name="errorpattern modes3 queries connectedToReflexive" annotations="//@problemConainer/@annotations.33">
415 <value xsi:type="language:Forall">
416 <quantifiedVariables name="p0">
417 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
418 </quantifiedVariables>
419 <expression xsi:type="language:Not">
420 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.15">
421 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.16/@value/@quantifiedVariables.0"/>
422 </operand>
423 </expression>
424 </value>
425 </assertions>
426 <assertions name="errorpattern modes3 queries outputReflexive" annotations="//@problemConainer/@annotations.34">
427 <value xsi:type="language:Forall">
428 <quantifiedVariables name="p0">
429 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
430 </quantifiedVariables>
431 <expression xsi:type="language:Not">
432 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.18">
433 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.17/@value/@quantifiedVariables.0"/>
434 </operand>
435 </expression>
436 </value>
437 </assertions>
438 <assertions name="errorpattern modes3 queries noExtraInputOfTurnout" annotations="//@problemConainer/@annotations.35">
439 <value xsi:type="language:Forall">
440 <quantifiedVariables name="p0">
441 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
442 </quantifiedVariables>
443 <expression xsi:type="language:Not">
444 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.22">
445 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.18/@value/@quantifiedVariables.0"/>
446 </operand>
447 </expression>
448 </value>
449 </assertions>
450 <assertions name="errorpattern modes3 queries connectedToNotSymmetric" annotations="//@problemConainer/@annotations.36">
451 <value xsi:type="language:Forall">
452 <quantifiedVariables name="p0">
453 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
454 </quantifiedVariables>
455 <quantifiedVariables name="p1">
456 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
457 </quantifiedVariables>
458 <expression xsi:type="language:Not">
459 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.23">
460 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.19/@value/@quantifiedVariables.0"/>
461 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@assertions.19/@value/@quantifiedVariables.1"/>
462 </operand>
463 </expression>
464 </value>
465 </assertions>
466 <relations xsi:type="language:RelationDeclaration" name="connectedTo reference Segment">
467 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
468 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
469 </relations>
470 <relations xsi:type="language:RelationDeclaration" name="occupiedBy reference Segment">
471 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
472 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
473 </relations>
474 <relations xsi:type="language:RelationDeclaration" name="trains reference Modes3ModelRoot">
475 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.1"/>
476 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
477 </relations>
478 <relations xsi:type="language:RelationDeclaration" name="segments reference Modes3ModelRoot">
479 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.1"/>
480 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
481 </relations>
482 <relations xsi:type="language:RelationDeclaration" name="turnouts reference Modes3ModelRoot">
483 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.1"/>
484 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
485 </relations>
486 <relations xsi:type="language:RelationDeclaration" name="straight reference Turnout">
487 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
488 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
489 </relations>
490 <relations xsi:type="language:RelationDeclaration" name="divergent reference Turnout">
491 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
492 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
493 </relations>
494 <relations xsi:type="language:RelationDeclaration" name="location reference Train">
495 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.3"/>
496 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
497 </relations>
498 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries turnoutInSegments" annotations="//@problemConainer/@annotations.10">
499 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
500 <variables name="parameter T">
501 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
502 </variables>
503 <value xsi:type="language:Or">
504 <operands xsi:type="language:Exists">
505 <quantifiedVariables name="variable 0">
506 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.1"/>
507 </quantifiedVariables>
508 <expression xsi:type="language:And">
509 <operands xsi:type="language:InstanceOf">
510 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.8/@variables.0"/>
511 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
512 </operands>
513 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.3">
514 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.8/@value/@operands.0/@quantifiedVariables.0"/>
515 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.8/@variables.0"/>
516 </operands>
517 </expression>
518 </operands>
519 </value>
520 </relations>
521 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries tooManyInputsOfSegment" annotations="//@problemConainer/@annotations.11">
522 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
523 <variables name="parameter S">
524 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
525 </variables>
526 <value xsi:type="language:Or">
527 <operands xsi:type="language:Exists">
528 <quantifiedVariables name="variable I1">
529 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
530 </quantifiedVariables>
531 <quantifiedVariables name="variable I2">
532 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
533 </quantifiedVariables>
534 <quantifiedVariables name="variable I3">
535 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
536 </quantifiedVariables>
537 <expression xsi:type="language:And">
538 <operands xsi:type="language:Not">
539 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.11">
540 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@variables.0"/>
541 </operand>
542 </operands>
543 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24">
544 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.0"/>
545 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@variables.0"/>
546 </operands>
547 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24">
548 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.1"/>
549 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@variables.0"/>
550 </operands>
551 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24">
552 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.2"/>
553 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@variables.0"/>
554 </operands>
555 <operands xsi:type="language:Distinct">
556 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.0"/>
557 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.1"/>
558 </operands>
559 <operands xsi:type="language:Distinct">
560 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.0"/>
561 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.2"/>
562 </operands>
563 <operands xsi:type="language:Distinct">
564 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.1"/>
565 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.2"/>
566 </operands>
567 </expression>
568 </operands>
569 </value>
570 </relations>
571 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries turnoutConnectedToBothOutputs" annotations="//@problemConainer/@annotations.12">
572 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
573 <variables name="parameter T">
574 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
575 </variables>
576 <value xsi:type="language:Or">
577 <operands xsi:type="language:Exists">
578 <quantifiedVariables name="variable Straight">
579 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
580 </quantifiedVariables>
581 <quantifiedVariables name="variable Divergent">
582 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
583 </quantifiedVariables>
584 <expression xsi:type="language:And">
585 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.5">
586 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@variables.0"/>
587 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.0"/>
588 </operands>
589 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.6">
590 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@variables.0"/>
591 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.1"/>
592 </operands>
593 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
594 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@variables.0"/>
595 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.0"/>
596 </operands>
597 <operands xsi:type="language:InstanceOf">
598 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.0"/>
599 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
600 </operands>
601 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
602 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@variables.0"/>
603 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.1"/>
604 </operands>
605 <operands xsi:type="language:InstanceOf">
606 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.1"/>
607 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
608 </operands>
609 </expression>
610 </operands>
611 </value>
612 </relations>
613 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries turnout" annotations="//@problemConainer/@annotations.13">
614 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
615 <variables name="parameter T">
616 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
617 </variables>
618 <value xsi:type="language:Or">
619 <operands xsi:type="language:And">
620 <operands xsi:type="language:InstanceOf">
621 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.11/@variables.0"/>
622 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
623 </operands>
624 </operands>
625 </value>
626 </relations>
627 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries turnoutOutputsAreSame" annotations="//@problemConainer/@annotations.14">
628 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
629 <variables name="parameter T">
630 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
631 </variables>
632 <value xsi:type="language:Or">
633 <operands xsi:type="language:Exists">
634 <quantifiedVariables name="variable S">
635 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
636 </quantifiedVariables>
637 <expression xsi:type="language:And">
638 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.5">
639 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.12/@variables.0"/>
640 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
641 </operands>
642 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.6">
643 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.12/@variables.0"/>
644 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
645 </operands>
646 <operands xsi:type="language:InstanceOf">
647 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
648 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
649 </operands>
650 </expression>
651 </operands>
652 </value>
653 </relations>
654 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries tooManyExtraInputsOfTurnout" annotations="//@problemConainer/@annotations.15">
655 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
656 <variables name="parameter T">
657 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
658 </variables>
659 <value xsi:type="language:Or">
660 <operands xsi:type="language:Exists">
661 <quantifiedVariables name="variable I1">
662 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
663 </quantifiedVariables>
664 <quantifiedVariables name="variable I2">
665 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
666 </quantifiedVariables>
667 <expression xsi:type="language:And">
668 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20">
669 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.13/@variables.0"/>
670 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.13/@value/@operands.0/@quantifiedVariables.0"/>
671 </operands>
672 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20">
673 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.13/@variables.0"/>
674 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.13/@value/@operands.0/@quantifiedVariables.1"/>
675 </operands>
676 <operands xsi:type="language:Distinct">
677 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.13/@value/@operands.0/@quantifiedVariables.0"/>
678 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.13/@value/@operands.0/@quantifiedVariables.1"/>
679 </operands>
680 </expression>
681 </operands>
682 </value>
683 </relations>
684 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries unreachable" annotations="//@problemConainer/@annotations.16">
685 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
686 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
687 <variables name="parameter S1">
688 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
689 </variables>
690 <variables name="parameter S2">
691 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
692 </variables>
693 <value xsi:type="language:Or">
694 <operands xsi:type="language:And">
695 <operands xsi:type="language:InstanceOf">
696 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.14/@variables.0"/>
697 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
698 </operands>
699 <operands xsi:type="language:InstanceOf">
700 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.14/@variables.1"/>
701 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
702 </operands>
703 <operands xsi:type="language:Not">
704 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.21">
705 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.14/@variables.0"/>
706 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.14/@variables.1"/>
707 </operand>
708 </operands>
709 </operands>
710 </value>
711 </relations>
712 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries connectedToReflexive" annotations="//@problemConainer/@annotations.17">
713 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
714 <variables name="parameter S">
715 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
716 </variables>
717 <value xsi:type="language:Or">
718 <operands xsi:type="language:And">
719 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
720 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.15/@variables.0"/>
721 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.15/@variables.0"/>
722 </operands>
723 </operands>
724 </value>
725 </relations>
726 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries turnoutOutput" annotations="//@problemConainer/@annotations.18">
727 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
728 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
729 <variables name="parameter T">
730 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
731 </variables>
732 <variables name="parameter S">
733 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
734 </variables>
735 <value xsi:type="language:Or">
736 <operands xsi:type="language:And">
737 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.5">
738 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16/@variables.0"/>
739 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16/@variables.1"/>
740 </operands>
741 <operands xsi:type="language:InstanceOf">
742 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16/@variables.1"/>
743 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
744 </operands>
745 </operands>
746 <operands xsi:type="language:And">
747 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.6">
748 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16/@variables.0"/>
749 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16/@variables.1"/>
750 </operands>
751 <operands xsi:type="language:InstanceOf">
752 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16/@variables.1"/>
753 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
754 </operands>
755 </operands>
756 </value>
757 </relations>
758 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries connectedTo" annotations="//@problemConainer/@annotations.19">
759 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
760 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
761 <variables name="parameter S1">
762 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
763 </variables>
764 <variables name="parameter S2">
765 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
766 </variables>
767 <value xsi:type="language:Or">
768 <operands xsi:type="language:And">
769 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
770 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.17/@variables.0"/>
771 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.17/@variables.1"/>
772 </operands>
773 <operands xsi:type="language:InstanceOf">
774 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.17/@variables.1"/>
775 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
776 </operands>
777 </operands>
778 </value>
779 </relations>
780 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries outputReflexive" annotations="//@problemConainer/@annotations.20">
781 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
782 <variables name="parameter T">
783 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
784 </variables>
785 <value xsi:type="language:Or">
786 <operands xsi:type="language:And">
787 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16">
788 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.18/@variables.0"/>
789 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.18/@variables.0"/>
790 </operands>
791 </operands>
792 </value>
793 </relations>
794 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries adjacent" annotations="//@problemConainer/@annotations.21">
795 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
796 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
797 <variables name="parameter S1">
798 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
799 </variables>
800 <variables name="parameter S2">
801 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
802 </variables>
803 <value xsi:type="language:Or">
804 <operands xsi:type="language:And">
805 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24">
806 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.19/@variables.0"/>
807 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.19/@variables.1"/>
808 </operands>
809 </operands>
810 <operands xsi:type="language:And">
811 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16">
812 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.19/@variables.1"/>
813 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.19/@variables.0"/>
814 </operands>
815 </operands>
816 </value>
817 </relations>
818 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries extraInputOfTurnout" annotations="//@problemConainer/@annotations.22">
819 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
820 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
821 <variables name="parameter T">
822 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
823 </variables>
824 <variables name="parameter S">
825 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
826 </variables>
827 <value xsi:type="language:Or">
828 <operands xsi:type="language:Exists">
829 <quantifiedVariables name="variable Straight">
830 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
831 </quantifiedVariables>
832 <quantifiedVariables name="variable Divergent">
833 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
834 </quantifiedVariables>
835 <expression xsi:type="language:And">
836 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.5">
837 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@variables.0"/>
838 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.0"/>
839 </operands>
840 <operands xsi:type="language:InstanceOf">
841 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.0"/>
842 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
843 </operands>
844 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.6">
845 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@variables.0"/>
846 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.1"/>
847 </operands>
848 <operands xsi:type="language:InstanceOf">
849 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.1"/>
850 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
851 </operands>
852 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24">
853 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@variables.1"/>
854 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@variables.0"/>
855 </operands>
856 <operands xsi:type="language:Distinct">
857 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@variables.1"/>
858 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.0"/>
859 </operands>
860 <operands xsi:type="language:Distinct">
861 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@variables.1"/>
862 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.1"/>
863 </operands>
864 </expression>
865 </operands>
866 </value>
867 </relations>
868 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries reachable" annotations="//@problemConainer/@annotations.23">
869 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
870 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
871 <variables name="parameter S1">
872 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
873 </variables>
874 <variables name="parameter S2">
875 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
876 </variables>
877 <value xsi:type="language:Or">
878 <operands xsi:type="language:And">
879 <operands xsi:type="language:InstanceOf">
880 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.21/@variables.1"/>
881 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
882 </operands>
883 </operands>
884 <operands xsi:type="language:And">
885 <operands xsi:type="language:TransitiveClosure" relation="//@problemConainer/@relations.19">
886 <leftOperand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.21/@variables.0"/>
887 <rightOperand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.21/@variables.1"/>
888 </operands>
889 </operands>
890 </value>
891 </relations>
892 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries noExtraInputOfTurnout" annotations="//@problemConainer/@annotations.24">
893 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
894 <variables name="parameter T">
895 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
896 </variables>
897 <value xsi:type="language:Or">
898 <operands xsi:type="language:Forall">
899 <quantifiedVariables name="variable 0">
900 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
901 </quantifiedVariables>
902 <expression xsi:type="language:And">
903 <operands xsi:type="language:InstanceOf">
904 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.22/@variables.0"/>
905 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.2"/>
906 </operands>
907 <operands xsi:type="language:Not">
908 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.20">
909 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.22/@variables.0"/>
910 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.22/@value/@operands.0/@quantifiedVariables.0"/>
911 </operand>
912 </operands>
913 </expression>
914 </operands>
915 </value>
916 </relations>
917 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries connectedToNotSymmetric" annotations="//@problemConainer/@annotations.25">
918 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
919 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
920 <variables name="parameter S1">
921 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
922 </variables>
923 <variables name="parameter S2">
924 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
925 </variables>
926 <value xsi:type="language:Or">
927 <operands xsi:type="language:And">
928 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
929 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.23/@variables.0"/>
930 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.23/@variables.1"/>
931 </operands>
932 <operands xsi:type="language:InstanceOf">
933 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.23/@variables.1"/>
934 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
935 </operands>
936 <operands xsi:type="language:Not">
937 <operand xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.17">
938 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.23/@variables.1"/>
939 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.23/@variables.0"/>
940 </operand>
941 </operands>
942 </operands>
943 </value>
944 </relations>
945 <relations xsi:type="language:RelationDefinition" name="pattern modes3 queries output" annotations="//@problemConainer/@annotations.26">
946 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
947 <parameters xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
948 <variables name="parameter S1">
949 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
950 </variables>
951 <variables name="parameter S2">
952 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
953 </variables>
954 <value xsi:type="language:Or">
955 <operands xsi:type="language:And">
956 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.0">
957 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24/@variables.0"/>
958 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24/@variables.1"/>
959 </operands>
960 <operands xsi:type="language:InstanceOf">
961 <value xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24/@variables.1"/>
962 <range xsi:type="language:ComplexTypeReference" referred="//@problemConainer/@types.0"/>
963 </operands>
964 </operands>
965 <operands xsi:type="language:And">
966 <operands xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.16">
967 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24/@variables.0"/>
968 <parameterSubstitutions xsi:type="language:SymbolicValue" symbolicReference="//@problemConainer/@relations.24/@variables.1"/>
969 </operands>
970 </operands>
971 </value>
972 </relations>
973 <elements name="o 1" definedInType="//@problemConainer/@types.4"/>
974 <containmentHierarchies typesOrderedInHierarchy="//@problemConainer/@types.0 //@problemConainer/@types.2 //@problemConainer/@types.3 //@problemConainer/@types.1 //@problemConainer/@types.4 //@problemConainer/@types.5" containmentRelations="//@problemConainer/@relations.2 //@problemConainer/@relations.3 //@problemConainer/@relations.4"/>
975 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@problemConainer/@assertions.0" relation="//@problemConainer/@relations.0" upper="2"/>
976 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@problemConainer/@assertions.1" relation="//@problemConainer/@relations.1" upper="1"/>
977 <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@problemConainer/@assertions.2" relation="//@problemConainer/@relations.5" lower="1"/>
978 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@problemConainer/@assertions.3" relation="//@problemConainer/@relations.5" upper="1"/>
979 <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@problemConainer/@assertions.4" relation="//@problemConainer/@relations.6" lower="1"/>
980 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@problemConainer/@assertions.5" relation="//@problemConainer/@relations.6" upper="1"/>
981 <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@problemConainer/@assertions.6" relation="//@problemConainer/@relations.7" lower="1"/>
982 <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@problemConainer/@assertions.7" relation="//@problemConainer/@relations.7" upper="1"/>
983 <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@problemConainer/@assertions.8" inverseA="//@problemConainer/@relations.1" inverseB="//@problemConainer/@relations.7"/>
984 <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@problemConainer/@assertions.9" inverseA="//@problemConainer/@relations.0" inverseB="//@problemConainer/@relations.0"/>
985 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.8" patternFullyQualifiedName="modes3.queries.turnoutInSegments">
986 <variableTrace targetLogicVariable="//@problemConainer/@relations.8/@value/@operands.0/@quantifiedVariables.0"/>
987 </annotations>
988 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.9" patternFullyQualifiedName="modes3.queries.tooManyInputsOfSegment">
989 <variableTrace targetLogicVariable="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.0"/>
990 <variableTrace targetLogicVariable="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.1"/>
991 <variableTrace targetLogicVariable="//@problemConainer/@relations.9/@value/@operands.0/@quantifiedVariables.2"/>
992 </annotations>
993 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.10" patternFullyQualifiedName="modes3.queries.turnoutConnectedToBothOutputs">
994 <variableTrace targetLogicVariable="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.0"/>
995 <variableTrace targetLogicVariable="//@problemConainer/@relations.10/@value/@operands.0/@quantifiedVariables.1"/>
996 </annotations>
997 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.11" patternFullyQualifiedName="modes3.queries.turnout"/>
998 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.12" patternFullyQualifiedName="modes3.queries.turnoutOutputsAreSame">
999 <variableTrace targetLogicVariable="//@problemConainer/@relations.12/@value/@operands.0/@quantifiedVariables.0"/>
1000 </annotations>
1001 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.13" patternFullyQualifiedName="modes3.queries.tooManyExtraInputsOfTurnout">
1002 <variableTrace targetLogicVariable="//@problemConainer/@relations.13/@value/@operands.0/@quantifiedVariables.0"/>
1003 <variableTrace targetLogicVariable="//@problemConainer/@relations.13/@value/@operands.0/@quantifiedVariables.1"/>
1004 </annotations>
1005 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.14" patternFullyQualifiedName="modes3.queries.unreachable"/>
1006 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.15" patternFullyQualifiedName="modes3.queries.connectedToReflexive"/>
1007 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.16" patternFullyQualifiedName="modes3.queries.turnoutOutput"/>
1008 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.17" patternFullyQualifiedName="modes3.queries.connectedTo"/>
1009 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.18" patternFullyQualifiedName="modes3.queries.outputReflexive"/>
1010 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.19" patternFullyQualifiedName="modes3.queries.adjacent"/>
1011 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.20" patternFullyQualifiedName="modes3.queries.extraInputOfTurnout">
1012 <variableTrace targetLogicVariable="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.0"/>
1013 <variableTrace targetLogicVariable="//@problemConainer/@relations.20/@value/@operands.0/@quantifiedVariables.1"/>
1014 </annotations>
1015 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.21" patternFullyQualifiedName="modes3.queries.reachable"/>
1016 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.22" patternFullyQualifiedName="modes3.queries.noExtraInputOfTurnout">
1017 <variableTrace targetLogicVariable="//@problemConainer/@relations.22/@value/@operands.0/@quantifiedVariables.0"/>
1018 </annotations>
1019 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.23" patternFullyQualifiedName="modes3.queries.connectedToNotSymmetric"/>
1020 <annotations xsi:type="viatra2logicannotations:TransfomedViatraQuery" target="//@problemConainer/@relations.24" patternFullyQualifiedName="modes3.queries.output"/>
1021 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.10" query="//@problemConainer/@annotations.10"/>
1022 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.11" query="//@problemConainer/@annotations.11"/>
1023 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.12" query="//@problemConainer/@annotations.12"/>
1024 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.13" query="//@problemConainer/@annotations.14"/>
1025 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.14" query="//@problemConainer/@annotations.15"/>
1026 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.15" query="//@problemConainer/@annotations.16"/>
1027 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.16" query="//@problemConainer/@annotations.17"/>
1028 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.17" query="//@problemConainer/@annotations.20"/>
1029 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.18" query="//@problemConainer/@annotations.24"/>
1030 <annotations xsi:type="viatra2logicannotations:TransformedViatraWellformednessConstraint" target="//@problemConainer/@assertions.19" query="//@problemConainer/@annotations.25"/>
1031 </problemConainer>
1032 <scopes maxNewElements="0" targetTypeInterpretation="//@partialtypeinterpratation.4"/>
1033 <scopes maxNewElements="0" targetTypeInterpretation="//@partialtypeinterpratation.5"/>
1034 <scopes maxNewElements="0" targetTypeInterpretation="//@partialtypeinterpratation.6"/>
1035 <scopes maxNewElements="0" targetTypeInterpretation="//@partialtypeinterpratation.7"/>
1036 <scopes maxNewElements="0" targetTypeInterpretation="//@partialtypeinterpratation.8"/>
1037</partialinterpretation:PartialInterpretation>
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.png b/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.png
deleted file mode 100644
index b6fa6e4e..00000000
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/output/solution1.png
+++ /dev/null
Binary files differ
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml b/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml
index 7341e19c..a105a729 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml
@@ -6,21 +6,19 @@
6 </extension> 6 </extension>
7 <extension id="modes3.queries.Modes3Queries" point="org.eclipse.viatra.query.runtime.queryspecification"> 7 <extension id="modes3.queries.Modes3Queries" point="org.eclipse.viatra.query.runtime.queryspecification">
8 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:modes3.queries.Modes3Queries" id="modes3.queries.Modes3Queries"> 8 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:modes3.queries.Modes3Queries" id="modes3.queries.Modes3Queries">
9 <query-specification fqn="modes3.queries.turnoutInSegments"/>
10 <query-specification fqn="modes3.queries.connectedTo"/> 9 <query-specification fqn="modes3.queries.connectedTo"/>
11 <query-specification fqn="modes3.queries.connectedToNotSymmetric"/> 10 <query-specification fqn="modes3.queries.connectedToNotSymmetric"/>
12 <query-specification fqn="modes3.queries.connectedToReflexive"/> 11 <query-specification fqn="modes3.queries.connectedToReflexive"/>
13 <query-specification fqn="modes3.queries.turnoutOutput"/> 12 <query-specification fqn="modes3.queries.turnoutOutput"/>
14 <query-specification fqn="modes3.queries.outputReflexive"/> 13 <query-specification fqn="modes3.queries.outputReflexive"/>
15 <query-specification fqn="modes3.queries.turnoutOutputsAreSame"/> 14 <query-specification fqn="modes3.queries.turnoutOutputsAreSame"/>
16 <query-specification fqn="modes3.queries.turnout"/>
17 <query-specification fqn="modes3.queries.output"/> 15 <query-specification fqn="modes3.queries.output"/>
18 <query-specification fqn="modes3.queries.tooManyInputsOfSegment"/> 16 <query-specification fqn="modes3.queries.tooManyInputsOfSegment"/>
19 <query-specification fqn="modes3.queries.turnoutConnectedToBothOutputs"/> 17 <query-specification fqn="modes3.queries.turnoutConnectedToBothOutputs"/>
20 <query-specification fqn="modes3.queries.extraInputOfTurnout"/>
21 <query-specification fqn="modes3.queries.noExtraInputOfTurnout"/>
22 <query-specification fqn="modes3.queries.tooManyExtraInputsOfTurnout"/>
23 <query-specification fqn="modes3.queries.adjacent"/> 18 <query-specification fqn="modes3.queries.adjacent"/>
19 <query-specification fqn="modes3.queries.tooManyInputsOfTurnout"/>
20 <query-specification fqn="modes3.queries.inputsOfTurnout"/>
21 <query-specification fqn="modes3.queries.tooFewInputsOfTurnout"/>
24 <query-specification fqn="modes3.queries.reachable"/> 22 <query-specification fqn="modes3.queries.reachable"/>
25 <query-specification fqn="modes3.queries.unreachable"/> 23 <query-specification fqn="modes3.queries.unreachable"/>
26 </group> 24 </group>
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql
index 982e6cec..b8841928 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql
@@ -2,11 +2,6 @@ package modes3.queries
2 2
3import "http://www.ece.mcgill.ca/wcet/modes3" 3import "http://www.ece.mcgill.ca/wcet/modes3"
4 4
5@Constraint(message = "turnoutInSegments", severity = "error", key = { T })
6pattern turnoutInSegments(T : Turnout) {
7 Modes3ModelRoot.segments(_, T);
8}
9
10pattern connectedTo(S1 : Segment, S2 : Segment) { 5pattern connectedTo(S1 : Segment, S2 : Segment) {
11 Segment.connectedTo(S1, S2); 6 Segment.connectedTo(S1, S2);
12} 7}
@@ -39,10 +34,6 @@ pattern turnoutOutputsAreSame(T : Turnout) {
39 Turnout.divergent(T, S); 34 Turnout.divergent(T, S);
40} 35}
41 36
42pattern turnout(T : Turnout) {
43 Turnout(T);
44}
45
46pattern output(S1 : Segment, S2 : Segment) { 37pattern output(S1 : Segment, S2 : Segment) {
47 Segment.connectedTo(S1, S2); 38 Segment.connectedTo(S1, S2);
48} or { 39} or {
@@ -56,8 +47,7 @@ pattern output(S1 : Segment, S2 : Segment) {
56//} 47//}
57 48
58@Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S }) 49@Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S })
59pattern tooManyInputsOfSegment(S : Segment) { 50pattern tooManyInputsOfSegment(S : SimpleSegment) {
60 neg find turnout(S);
61 find output(I1, S); 51 find output(I1, S);
62 find output(I2, S); 52 find output(I2, S);
63 find output(I3, S); 53 find output(I3, S);
@@ -74,30 +64,38 @@ pattern turnoutConnectedToBothOutputs(T : Turnout) {
74 Segment.connectedTo(T, Divergent); 64 Segment.connectedTo(T, Divergent);
75} 65}
76 66
77pattern extraInputOfTurnout(T : Turnout, S : Segment) { 67pattern adjacent(S1 : Segment, S2 : Segment) {
78 Turnout.straight(T, Straight); 68 find output(S1, S2);
79 Turnout.divergent(T, Divergent); 69} or {
80 find output(S, T); 70 find turnoutOutput(S2, S1);
81 S != Straight;
82 S != Divergent;
83} 71}
84 72
85@Constraint(message = "noExtraInputOfTurnout", severity = "error", key = { T }) 73@Constraint(message = "turnoutConnectedToBothOutputs", severity = "error", key = { T })
86pattern noExtraInputOfTurnout(T : Turnout) { 74pattern tooManyInputsOfTurnout(T : Turnout) {
87 neg find extraInputOfTurnout(T, _); 75 find adjacent(I1, T);
76 find adjacent(I2, T);
77 find adjacent(I3, T);
78 find adjacent(I4, T);
79 I1 != I2;
80 I1 != I3;
81 I1 != I4;
82 I2 != I3;
83 I2 != I4;
84 I3 != I4;
88} 85}
89 86
90@Constraint(message = "tooManyExtraInputsOfTurnout", severity = "error", key = { T }) 87pattern inputsOfTurnout(T : Turnout) {
91pattern tooManyExtraInputsOfTurnout(T : Turnout) { 88 find adjacent(I1, T);
92 find extraInputOfTurnout(T, I1); 89 find adjacent(I2, T);
93 find extraInputOfTurnout(T, I2); 90 find adjacent(I3, T);
94 I1 != I2; 91 I1 != I2;
92 I1 != I3;
93 I2 != I3;
95} 94}
96 95
97pattern adjacent(S1 : Segment, S2 : Segment) { 96@Constraint(message = "tooFewInputsOfTurnout", severity = "error", key = { T })
98 find output(S1, S2); 97pattern tooFewInputsOfTurnout(T : Turnout) {
99} or { 98 neg find inputsOfTurnout(T);
100 find turnoutOutput(S2, S1);
101} 99}
102 100
103pattern reachable(S1 : Segment, S2 : Segment) { 101pattern reachable(S1 : Segment, S2 : Segment) {
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend
index 71d1798f..fac7c496 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend
@@ -8,6 +8,7 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration
8import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor 8import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor
9import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsFactory 9import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsFactory
10import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage 10import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage
11import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel
11import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder 12import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder
12import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage 13import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage
13import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition 14import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition
@@ -22,6 +23,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Polyhedr
22import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorSolver 23import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorSolver
23import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy 24import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy
24import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic 25import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic
26import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink
25import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation 27import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
26import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 28import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
27import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage 29import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage
@@ -44,8 +46,6 @@ import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions
44import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchEMFBackendFactory 46import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchEMFBackendFactory
45import org.eclipse.viatra.query.runtime.rete.matcher.ReteBackendFactory 47import org.eclipse.viatra.query.runtime.rete.matcher.ReteBackendFactory
46import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor 48import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
47import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition
48import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink
49 49
50@FinalFieldsConstructor 50@FinalFieldsConstructor
51class Modes3ModelGenerator { 51class Modes3ModelGenerator {
@@ -92,22 +92,32 @@ class Modes3ModelGenerator {
92 minNewElements = modelSize 92 minNewElements = modelSize
93 maxNewElements = modelSize 93 maxNewElements = modelSize
94 minNewElementsByType => [ 94 minNewElementsByType => [
95 put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.turnout), 1) 95// put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.turnout), 5)
96 ] 96 ]
97 maxNewElementsByType => [ 97 maxNewElementsByType => [
98 put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.train), 5) 98 put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.train), 5)
99 put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.turnout), 5)
99 ] 100 ]
100 ] 101 ]
101 solutionScope.numberOfRequiredSolutions = 1 102 solutionScope => [
103 numberOfRequiredSolutions = 1
104 ]
105 scopeWeight = 5
102 nameNewElements = false 106 nameNewElements = false
103 typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis 107 typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis
104 stateCoderStrategy = StateCoderStrategy::Neighbourhood 108 stateCoderStrategy = StateCoderStrategy.PairwiseNeighbourhood
105 scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( 109 scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral(
106 PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) 110 PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp)
107// unitPropagationPatternGenerators += new Modes3UnitPropagationGenerator(ecore2Logic, metamodelLogic.trace) 111 hints += new Modes3TypeScopeHint(ecore2Logic, metamodelLogic.trace)
108 debugConfiguration.partialInterpretatioVisualiser = null 112 unitPropagationPatternGenerators += new Modes3UnitPropagationGenerator(ecore2Logic, metamodelLogic.trace)
113 debugConfiguration => [
114 partialInterpretatioVisualiser = new GraphvizVisualiser
115// partalInterpretationVisualisationFrequency = 50
116 ]
117 documentationLevel = DocumentationLevel.NORMAL
109 ] 118 ]
110 val workspace = new FileSystemWorkspace("output/", "") 119 val workspace = new FileSystemWorkspace("output/", "")
120 workspace.writeModel(logic.output, "problem.logicproblem")
111 val solution = solver.solve(logic.output, config, workspace) 121 val solution = solver.solve(logic.output, config, workspace)
112 if (solution instanceof ModelResult) { 122 if (solution instanceof ModelResult) {
113 println("Saving generated solutions") 123 println("Saving generated solutions")
@@ -122,7 +132,6 @@ class Modes3ModelGenerator {
122 workspace.writeText('''solution«representationNumber».gml''', gml) 132 workspace.writeText('''solution«representationNumber».gml''', gml)
123 if (representation.newElements.size < 160) { 133 if (representation.newElements.size < 160) {
124 if (representation instanceof PartialInterpretation) { 134 if (representation instanceof PartialInterpretation) {
125 representation.problem.types.forEach[println(name)]
126 val rootType = (representation.problem.types.findFirst [ 135 val rootType = (representation.problem.types.findFirst [
127 name == "Modes3ModelRoot class DefinedPart" 136 name == "Modes3ModelRoot class DefinedPart"
128 ] as TypeDefinition) 137 ] as TypeDefinition)
@@ -198,10 +207,7 @@ class Modes3ModelGenerator {
198 PartialinterpretationPackage.eINSTANCE.class 207 PartialinterpretationPackage.eINSTANCE.class
199 Ecore2logicannotationsPackage.eINSTANCE.class 208 Ecore2logicannotationsPackage.eINSTANCE.class
200 Viatra2LogicAnnotationsPackage.eINSTANCE.class 209 Viatra2LogicAnnotationsPackage.eINSTANCE.class
201 Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("ecore", new XMIResourceFactoryImpl) 210 Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("*", new XMIResourceFactoryImpl)
202 Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("logicproblem", new XMIResourceFactoryImpl)
203 Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("partialinterpretation",
204 new XMIResourceFactoryImpl)
205 } 211 }
206 212
207 def static void main(String[] args) { 213 def static void main(String[] args) {
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3TypeScopeHint.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3TypeScopeHint.xtend
new file mode 100644
index 00000000..94e5eb08
--- /dev/null
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3TypeScopeHint.xtend
@@ -0,0 +1,79 @@
1package modes3.run
2
3import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic
4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality
7import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint
8import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory
9import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator
10import java.util.Map
11import modes3.Modes3Package
12import modes3.queries.Adjacent
13import org.eclipse.viatra.query.runtime.api.IPatternMatch
14import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher
15import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
17
18class Modes3TypeScopeHint implements LinearTypeConstraintHint {
19 static val TURNOUT_NEIGHBOR_COUNT = "turnoutNeighborCount"
20
21 val Type segmentType
22 val Type turnoutType
23
24 new(extension Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) {
25 extension val Modes3Package = Modes3Package.eINSTANCE
26 segmentType = ecore2LogicTrace.TypeofEClass(segment)
27 turnoutType = ecore2LogicTrace.TypeofEClass(turnout)
28 }
29
30 override getAdditionalPatterns(extension PatternGenerator patternGenerator, Map<String, PQuery> fqnToPQuery) {
31 '''
32 pattern «TURNOUT_NEIGHBOR_COUNT»_helper(problem: LogicProblem, interpretation: PartialInterpretation, source: DefinedElement, target: DefinedElement) {
33 find interpretation(problem, interpretation);
34 find mustExist(problem, interpretation, source);
35 find mustExist(problem, interpretation, target);
36 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
37 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
38 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["source", "target"], Modality.MUST, true, false)»
39 }
40
41 pattern «TURNOUT_NEIGHBOR_COUNT»(problem: LogicProblem, interpretation: PartialInterpretation, element: DefinedElement, N) {
42 find interpretation(problem, interpretation);
43 find mustExist(problem, interpretation, element);
44 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "element")»
45 N == count find «TURNOUT_NEIGHBOR_COUNT»_helper(problem, interpretation, element, _);
46 }
47 '''
48 }
49
50 override createConstraintUpdater(LinearTypeExpressionBuilderFactory builderFactory) {
51 val turnoutNeighborCountMatcher = builderFactory.createMatcher(TURNOUT_NEIGHBOR_COUNT)
52 val newNeighbors = builderFactory.createBuilder.add(1, segmentType).build
53
54 return [ partialInterpretation |
55 val requiredNeighbbors = turnoutNeighborCountMatcher.getRemainingCount(partialInterpretation, 3)
56 newNeighbors.tightenLowerBound(requiredNeighbbors)
57 ]
58 }
59
60 private static def <T extends IPatternMatch> getRemainingCount(ViatraQueryMatcher<T> matcher,
61 PartialInterpretation partialInterpretation, int capacity) {
62 val partialMatch = matcher.newEmptyMatch
63 partialMatch.set(0, partialInterpretation.problem)
64 partialMatch.set(1, partialInterpretation)
65 val iterator = matcher.streamAllMatches(partialMatch).iterator
66 var int max = 0
67 while (iterator.hasNext) {
68 val match = iterator.next
69 val n = (match.get(3) as Integer).intValue
70 if (n < capacity) {
71 val required = capacity - n
72 if (max < required) {
73 max = required
74 }
75 }
76 }
77 max
78 }
79}
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3UnitPropagationGenerator.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3UnitPropagationGenerator.xtend
index 61bd2814..953a21d4 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3UnitPropagationGenerator.xtend
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3UnitPropagationGenerator.xtend
@@ -9,20 +9,21 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGene
9import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.UnitPropagationPatternGenerator 9import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.UnitPropagationPatternGenerator
10import java.util.Map 10import java.util.Map
11import modes3.Modes3Package 11import modes3.Modes3Package
12import modes3.queries.ExtraInputOfTurnout 12import modes3.queries.Adjacent
13import modes3.queries.Output 13import modes3.queries.Output
14import modes3.queries.TurnoutOutput
15import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery 14import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
16import org.eclipse.xtend2.lib.StringConcatenationClient 15import org.eclipse.xtend2.lib.StringConcatenationClient
17 16
18class Modes3UnitPropagationGenerator implements UnitPropagationPatternGenerator { 17class Modes3UnitPropagationGenerator implements UnitPropagationPatternGenerator {
19 static val MUST_NOT_CONNECTED_TO = "mustNotConnectedTo" 18 static val MUST_NOT_CONNECTED_TO = "mustNotConnectedTo"
20 static val MUST_NOT_CONNECTED_TO_HELPER = "mustNotConnectedTo_helper"
21 static val MUST_NOT_TURNOUT_OUTPUT = "mustNotTurnoutOutput"
22 static val MUST_NOT_STRAIGHT = "mustNotStraight" 19 static val MUST_NOT_STRAIGHT = "mustNotStraight"
23 static val MUST_NOT_DIVERGENT = "mustNotDivergent" 20 static val MUST_NOT_DIVERGENT = "mustNotDivergent"
21 static val MUST_CONNECTED_TO = "mustConnectedTo"
22 static val MUST_STRAIGHT = "mustStraight"
23 static val MUST_DIVERGENT = "mustDivergent"
24 24
25 val Type segmentType 25 val Type segmentType
26 val Type simpleSegmentType
26 val Type turnoutType 27 val Type turnoutType
27 val Relation connectedToRelation 28 val Relation connectedToRelation
28 val Relation straightRelation 29 val Relation straightRelation
@@ -31,6 +32,7 @@ class Modes3UnitPropagationGenerator implements UnitPropagationPatternGenerator
31 new(extension Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) { 32 new(extension Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) {
32 extension val Modes3Package = Modes3Package.eINSTANCE 33 extension val Modes3Package = Modes3Package.eINSTANCE
33 segmentType = ecore2LogicTrace.TypeofEClass(segment) 34 segmentType = ecore2LogicTrace.TypeofEClass(segment)
35 simpleSegmentType = ecore2LogicTrace.TypeofEClass(simpleSegment)
34 turnoutType = ecore2LogicTrace.TypeofEClass(turnout) 36 turnoutType = ecore2LogicTrace.TypeofEClass(turnout)
35 connectedToRelation = ecore2LogicTrace.relationOfReference(segment_ConnectedTo) 37 connectedToRelation = ecore2LogicTrace.relationOfReference(segment_ConnectedTo)
36 straightRelation = ecore2LogicTrace.relationOfReference(turnout_Straight) 38 straightRelation = ecore2LogicTrace.relationOfReference(turnout_Straight)
@@ -38,7 +40,11 @@ class Modes3UnitPropagationGenerator implements UnitPropagationPatternGenerator
38 } 40 }
39 41
40 override getMustPatterns() { 42 override getMustPatterns() {
41 emptyMap 43 #{
44 connectedToRelation -> MUST_CONNECTED_TO,
45 straightRelation -> MUST_STRAIGHT,
46 divergentRelation -> MUST_DIVERGENT
47 }
42 } 48 }
43 49
44 override getMustNotPatterns() { 50 override getMustNotPatterns() {
@@ -55,150 +61,356 @@ class Modes3UnitPropagationGenerator implements UnitPropagationPatternGenerator
55 source: DefinedElement, target: DefinedElement 61 source: DefinedElement, target: DefinedElement
56 ''' 62 '''
57 63
58 val StringConcatenationClient commonParameterConstraints = ''' 64 val StringConcatenationClient commonMustParameterConstraints = '''
59 find interpretation(problem, interpretation); 65 find interpretation(problem, interpretation);
60 find mustExist(problem, interpretation, source); 66 find mustExist(problem, interpretation, source);
61 find mustExist(problem, interpretation, target); 67 find mustExist(problem, interpretation, target);
62 ''' 68 '''
69
70 val StringConcatenationClient commonMayParameterConstraints = '''
71 find interpretation(problem, interpretation);
72 find mayExist(problem, interpretation, source);
73 find mayExist(problem, interpretation, target);
74 '''
63 75
64 ''' 76 '''
65 pattern «MUST_NOT_CONNECTED_TO_HELPER»(«parameters») { 77 pattern mayInput(«parameters») {
66 // connectedToReflexive unit propagation 78 «commonMayParameterConstraints»
67 «commonParameterConstraints» 79 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
68 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "source")» 80 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["target", "source"], Modality.MAY, true, false)»
69 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")» 81 neg «referRelation(straightRelation, "target", "source", Modality.MUST, fqnToPQuery)»
70 source == target; 82 neg «referRelation(straightRelation, "target", "source", Modality.MUST, fqnToPQuery)»
83 }
84
85 pattern multipleMayInput(problem: LogicProblem, interpretation: PartialInterpretation,
86 target: DefinedElement) {
87 find interpretation(problem, interpretation);
88 find mustExist(problem, interpretation, target);
89 find mayInput(problem, interpretaton, source1, target);
90 find mayInput(problem, interpretaton, source2, target);
91 neg find mustEquivalent(problem, interpretation, source1, source2);
92 }
93
94 pattern multipleMayStraight(problem: LogicProblem, interpretation: PartialInterpretation,
95 source: DefinedElement) {
96 find interpretation(problem, interpretation);
97 find mustExist(problem, interpretation, source);
98 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
99 «referRelation(straightRelation, "source", "target1", Modality.MAY, fqnToPQuery)»
100 «referRelation(straightRelation, "source", "target2", Modality.MAY, fqnToPQuery)»
101 neg find mustEquivalent(problem, interpretation, target1, target2);
102 }
103
104 pattern multipleMayDivergent(problem: LogicProblem, interpretation: PartialInterpretation,
105 source: DefinedElement) {
106 find interpretation(problem, interpretation);
107 find mustExist(problem, interpretation, source);
108 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
109 «referRelation(divergentRelation, "source", "target1", Modality.MAY, fqnToPQuery)»
110 «referRelation(divergentRelation, "source", "target2", Modality.MAY, fqnToPQuery)»
111 neg find mustEquivalent(problem, interpretation, target1, target2);
112 }
113
114 pattern «MUST_CONNECTED_TO»(«parameters») {
115 «commonMustParameterConstraints»
116 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
117 find mayInput(problem, interpretaton, source, target);
118 neg find multipleMayInput(problem, interpretaton, target);
119 «referRelation(connectedToRelation, "source", "target", Modality.MAY, fqnToPQuery)»
120 neg «referRelation(connectedToRelation, "source", "target", Modality.MUST, fqnToPQuery)»
121 neg «referRelation(straightRelation, "source", "target", Modality.MAY, fqnToPQuery)»
122 neg «referRelation(divergentRelation, "source", "target", Modality.MAY, fqnToPQuery)»
123 }
124
125 pattern «MUST_STRAIGHT»(«parameters») {
126 «commonMustParameterConstraints»
127 neg «referRelation(straightRelation, "source", "_", Modality.MUST, fqnToPQuery)»
128 neg find multipleMayStraight(problem, interpretation, source);
129 «referRelation(straightRelation, "source", "target", Modality.MAY, fqnToPQuery)»
130 neg «referRelation(straightRelation, "source", "target", Modality.MUST, fqnToPQuery)»
71 } or { 131 } or {
72 // tooManyInputsOfSegment unit propagation 132 «commonMustParameterConstraints»
73 «commonParameterConstraints» 133 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
134 find mayInput(problem, interpretaton, source, target);
135 neg find multipleMayInput(problem, interpretaton, target);
136 neg «referRelation(connectedToRelation, "source", "target", Modality.MAY, fqnToPQuery)»
137 «referRelation(straightRelation, "source", "target", Modality.MAY, fqnToPQuery)»
138 neg «referRelation(straightRelation, "source", "target", Modality.MUST, fqnToPQuery)»
139 neg «referRelation(divergentRelation, "source", "target", Modality.MAY, fqnToPQuery)»
140 }
141
142 pattern «MUST_DIVERGENT»(«parameters») {
143 «commonMustParameterConstraints»
144 neg «referRelation(divergentRelation, "source", "_", Modality.MUST, fqnToPQuery)»
145 neg find multipleMayDivergent(problem, interpretation, source);
146 «referRelation(divergentRelation, "source", "target", Modality.MAY, fqnToPQuery)»
147 neg «referRelation(divergentRelation, "source", "target", Modality.MUST, fqnToPQuery)»
148 } or {
149 «commonMustParameterConstraints»
150 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
151 find mayInput(problem, interpretaton, source, target);
152 neg find multipleMayInput(problem, interpretaton, target);
153 neg «referRelation(connectedToRelation, "source", "target", Modality.MAY, fqnToPQuery)»
154 neg «referRelation(straightRelation, "source", "target", Modality.MAY, fqnToPQuery)»
155 «referRelation(divergentRelation, "source", "target", Modality.MAY, fqnToPQuery)»
156 neg «referRelation(divergentRelation, "source", "target", Modality.MUST, fqnToPQuery)»
157 }
158
159 pattern turnoutOutput_must_to_true_by_straight(«parameters», T : DefinedElement, S : DefinedElement) {
160 «commonMayParameterConstraints»
161 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
162 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
163 T == source;
164 S == target;
165 }
166
167 pattern turnoutOutput_must_to_true_by_divergent(«parameters», T : DefinedElement, S : DefinedElement) {
168 «commonMayParameterConstraints»
169 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
170 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
171 T == source;
172 S == target;
173 }
174
175 pattern output_must_to_true_by_connectedTo(«parameters», S1 : DefinedElement, S2 : DefinedElement) {
176 «commonMayParameterConstraints»
177 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "source")»
178 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
179 S1 == source;
180 S2 == target;
181 }
182
183 pattern output_must_to_true_by_straight(«parameters», S1 : DefinedElement, S2 : DefinedElement) {
184 find turnoutOutput_must_to_true_by_straight(problem, interpretation, source, target, S1, S2);
185 }
186
187 pattern output_must_to_true_by_divergent(«parameters», S1 : DefinedElement, S2 : DefinedElement) {
188 find turnoutOutput_must_to_true_by_divergent(problem, interpretation, source, target, S1, S2);
189 }
190
191 pattern adjacent_must_to_true_by_connectedTo(«parameters», S1 : DefinedElement, S2 : DefinedElement) {
192 find output_must_to_true_by_connectedTo(problem, interpretation, source, target, S1, S2);
193 }
194
195 pattern adjacent_must_to_true_by_straight(«parameters», S1 : DefinedElement, S2 : DefinedElement) {
196 find output_must_to_true_by_straight(problem, interpretation, source, target, S1, S2);
197 } or {
198 find turnoutOutput_must_to_true_by_straight(problem, interpretation, source, target, S2, S1);
199 }
200
201 pattern adjacent_must_to_true_by_divergent(«parameters», S1 : DefinedElement, S2 : DefinedElement) {
202 find output_must_to_true_by_divergent(problem, interpretation, source, target, S1, S2);
203 } or {
204 find turnoutOutput_must_to_true_by_divergent(problem, interpretation, source, target, S2, S1);
205 }
206
207 pattern connectedToReflexive_must_to_true_by_connectedTo(«parameters», S : DefinedElement) {
208 find mustExist(problem, interpretation, source);
74 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "source")» 209 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "source")»
75 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")» 210 S == source;
76 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "input1")» 211 S == target;
77 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "input2")»
78 neg «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
79 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["input1", "source"], Modality.MUST, true, false)»
80 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["input2", "source"], Modality.MUST, true, false)»
81 input1 != input2;
82 input1 != target;
83 input2 != target;
84 } or {
85 // turnoutConnectedToBothOutputs unit propagation 1
86 «commonParameterConstraints»
87 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
88 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
89 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "divergent")»
90 «referRelation(straightRelation, "source", "target", Modality.MUST, fqnToPQuery)»
91 «referRelation(divergentRelation, "source", "divergent", Modality.MUST, fqnToPQuery)»
92 «referRelation(connectedToRelation, "source", "divergent", Modality.MUST, fqnToPQuery)»
93 } or {
94 // turnoutConnectedToBothOutputs unit propagation 2
95 «commonParameterConstraints»
96 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
97 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
98 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "straight")»
99 «referRelation(straightRelation, "source", "straight", Modality.MUST, fqnToPQuery)»
100 «referRelation(divergentRelation, "source", "target", Modality.MUST, fqnToPQuery)»
101 «referRelation(connectedToRelation, "source", "straight", Modality.MUST, fqnToPQuery)»
102 } or {
103 // tooManyExtraInputsOfTurnout unit propagation
104 «commonParameterConstraints»
105 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
106 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
107 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "extraInput")»
108 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(TurnoutOutput.instance.fullyQualifiedName), #["source", "target"], Modality.MAY, false, false)»
109 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(ExtraInputOfTurnout.instance.fullyQualifiedName), #["source", "extraInput"], Modality.MUST, true, false)»
110 target != extraInput;
111 } 212 }
112 213
113 pattern «MUST_NOT_CONNECTED_TO»(«parameters») { 214 pattern outputReflexive_must_to_true_by_straight(«parameters», T : DefinedElement) {
114 find «MUST_NOT_CONNECTED_TO_HELPER»(problem, interpretation, source, target); 215 find turnoutOutput_must_to_true_by_straight(problem, interpretation, source, target, T, T);
216 }
217
218 pattern outputReflexive_must_to_true_by_divergent(«parameters», T : DefinedElement) {
219 find turnoutOutput_must_to_true_by_divergent(problem, interpretation, source, target, T, T);
220 }
221
222 pattern turnoutOutputsAreSame_must_to_true_by_straight(«parameters», T : DefinedElement) {
223 «commonMayParameterConstraints»
224 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
225 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
226 T == source;
227 S == target;
228 «referRelation(divergentRelation, "T", "S", Modality.MUST, fqnToPQuery)»
229 }
230
231 pattern turnoutOutputsAreSame_must_to_true_by_divergent(«parameters», T : DefinedElement) {
232 «commonMayParameterConstraints»
233 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
234 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
235 T == source;
236 S == target;
237 «referRelation(straightRelation, "T", "S", Modality.MUST, fqnToPQuery)»
238 }
239
240 pattern tooManyInputsOfSegment_must_to_true_by_connectedTo(«parameters», S : DefinedElement) {
241 find mustExist(problem, interpretation, S);
242 «typeIndexer.referInstanceOf(simpleSegmentType, Modality.MUST, "S")»
243 find output_must_to_true_by_connectedTo(problem, interpretation, source, target, I1, S);
244 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["I2", "S"], Modality.MUST, true, false)»
245 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["I3", "S"], Modality.MUST, true, false)»
246 I1 != I2;
247 I1 != I3;
248 I2 != I3;
249 }
250
251 pattern tooManyInputsOfSegment_must_to_true_by_straight(«parameters», S : DefinedElement) {
252 find mustExist(problem, interpretation, S);
253 «typeIndexer.referInstanceOf(simpleSegmentType, Modality.MUST, "S")»
254 find output_must_to_true_by_straight(problem, interpretation, source, target, I1, S);
255 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["I2", "S"], Modality.MUST, true, false)»
256 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["I3", "S"], Modality.MUST, true, false)»
257 I1 != I2;
258 I1 != I3;
259 I2 != I3;
260 }
261
262 pattern tooManyInputsOfSegment_must_to_true_by_divergent(«parameters», S : DefinedElement) {
263 find mustExist(problem, interpretation, S);
264 «typeIndexer.referInstanceOf(simpleSegmentType, Modality.MUST, "S")»
265 find output_must_to_true_by_divergent(problem, interpretation, source, target, I1, S);
266 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["I2", "S"], Modality.MUST, true, false)»
267 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["I3", "S"], Modality.MUST, true, false)»
268 I1 != I2;
269 I1 != I3;
270 I2 != I3;
271 }
272
273 pattern turnoutConnectedToBothOutputs_must_to_true_by_connectedTo(«parameters», T : DefinedElement) {
274 «commonMayParameterConstraints»
275 find mustExist(problem, interpretation, Straight);
276 find mustExist(problem, interpretation, Divergent);
277 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
278 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
279 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Straight")»
280 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Divergent")»
281 «referRelation(straightRelation, "T", "Straight", Modality.MUST, fqnToPQuery)»
282 «referRelation(divergentRelation, "T", "Divergent", Modality.MUST, fqnToPQuery)»
283 T == source;
284 Straight == target;
285 «referRelation(connectedToRelation, "T", "Divergent", Modality.MUST, fqnToPQuery)»
115 } or { 286 } or {
116 find «MUST_NOT_CONNECTED_TO_HELPER»(problem, interpretation, target, source); 287 «commonMayParameterConstraints»
288 find mustExist(problem, interpretation, Straight);
289 find mustExist(problem, interpretation, Divergent);
290 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
291 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
292 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Straight")»
293 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Divergent")»
294 «referRelation(straightRelation, "T", "Straight", Modality.MUST, fqnToPQuery)»
295 «referRelation(divergentRelation, "T", "Divergent", Modality.MUST, fqnToPQuery)»
296 «referRelation(connectedToRelation, "T", "Straight", Modality.MUST, fqnToPQuery)»
297 T == source;
298 Straight == target;
117 } 299 }
118 300
119 pattern «MUST_NOT_TURNOUT_OUTPUT»(«parameters») { 301 pattern turnoutConnectedToBothOutputs_must_to_true_by_straight(«parameters», T : DefinedElement) {
120 // outputReflexive unit propagation 302 «commonMayParameterConstraints»
121 «commonParameterConstraints» 303 find mustExist(problem, interpretation, Straight);
122 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")» 304 find mustExist(problem, interpretation, Divergent);
123 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "target")» 305 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
124 source == target; 306 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
307 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Straight")»
308 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Divergent")»
309 T == source;
310 Straight == target;
311 «referRelation(divergentRelation, "T", "Divergent", Modality.MUST, fqnToPQuery)»
312 «referRelation(connectedToRelation, "T", "Straight", Modality.MUST, fqnToPQuery)»
313 «referRelation(connectedToRelation, "T", "Divergent", Modality.MUST, fqnToPQuery)»
314 }
315
316 pattern turnoutConnectedToBothOutputs_must_to_true_by_divergent(«parameters», T : DefinedElement) {
317 «commonMayParameterConstraints»
318 find mustExist(problem, interpretation, Straight);
319 find mustExist(problem, interpretation, Divergent);
320 «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "source")»
321 «typeIndexer.referInstanceOf(segmentType, Modality.MAY, "target")»
322 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Straight")»
323 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "Divergent")»
324 «referRelation(straightRelation, "T", "Straight", Modality.MUST, fqnToPQuery)»
325 T == source;
326 Divergent == target;
327 «referRelation(connectedToRelation, "T", "Straight", Modality.MUST, fqnToPQuery)»
328 «referRelation(connectedToRelation, "T", "Divergent", Modality.MUST, fqnToPQuery)»
329 }
330
331 pattern tooManyInputsOfTurnout_must_to_true_by_connectedTo(«parameters», T : DefinedElement) {
332 find mustExist(problem, interpretation, S);
333 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "S")»
334 find adjacent_must_to_true_by_connectedTo(problem, interpretation, source, target, I1, S);
335 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I2", "S"], Modality.MUST, true, false)»
336 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I3", "S"], Modality.MUST, true, false)»
337 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I4", "S"], Modality.MUST, true, false)»
338 I1 != I2;
339 I1 != I3;
340 I1 != I4;
341 I2 != I3;
342 I2 != I4;
343 I3 != I4;
344 }
345
346 pattern tooManyInputsOfTurnout_must_to_true_by_straight(«parameters», T : DefinedElement) {
347 find mustExist(problem, interpretation, S);
348 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "S")»
349 find adjacent_must_to_true_by_straight(problem, interpretation, source, target, I1, S);
350 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I2", "S"], Modality.MUST, true, false)»
351 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I3", "S"], Modality.MUST, true, false)»
352 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I4", "S"], Modality.MUST, true, false)»
353 I1 != I2;
354 I1 != I3;
355 I1 != I4;
356 I2 != I3;
357 I2 != I4;
358 I3 != I4;
359 }
360
361 pattern tooManyInputsOfTurnout_must_to_true_by_divergent(«parameters», T : DefinedElement) {
362 find mustExist(problem, interpretation, S);
363 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "S")»
364 find adjacent_must_to_true_by_divergent(problem, interpretation, source, target, I1, S);
365 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I2", "S"], Modality.MUST, true, false)»
366 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I3", "S"], Modality.MUST, true, false)»
367 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Adjacent.instance.fullyQualifiedName), #["I4", "S"], Modality.MUST, true, false)»
368 I1 != I2;
369 I1 != I3;
370 I1 != I4;
371 I2 != I3;
372 I2 != I4;
373 I3 != I4;
374 }
375
376 pattern «MUST_NOT_CONNECTED_TO»_helper(«parameters») {
377 find connectedToReflexive_must_to_true_by_connectedTo(problem, interpretation, source, target, _);
125 } or { 378 } or {
126 // tooManyInputsOfSegment unit propagation 379 find tooManyInputsOfSegment_must_to_true_by_connectedTo(problem, interpretation, source, target, _);
127 «commonParameterConstraints» 380 } or {
128 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")» 381 find turnoutConnectedToBothOutputs_must_to_true_by_connectedTo(problem, interpretation, source, target, _);
129 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")» 382 } or {
130 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "input1")» 383 find tooManyInputsOfTurnout_must_to_true_by_connectedTo(problem, interpretation, source, target, _);
131 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "input2")» 384 }
132 neg «typeIndexer.referInstanceOf(turnoutType, Modality.MAY, "target")» 385
133 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["input1", "target"], Modality.MUST, true, false)» 386 pattern «MUST_NOT_CONNECTED_TO»(«parameters») {
134 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(Output.instance.fullyQualifiedName), #["input2", "target"], Modality.MUST, true, false)» 387 find «MUST_NOT_CONNECTED_TO»_helper(problem, interpretation, source, target);
135 input1 != input2; 388 } or {
136 input1 != source; 389 find «MUST_NOT_CONNECTED_TO»_helper(problem, interpretation, target, source);
137 input2 != source;
138 } 390 }
139 391
140 pattern «MUST_NOT_STRAIGHT»(«parameters») { 392 pattern «MUST_NOT_STRAIGHT»(«parameters») {
141 find «MUST_NOT_TURNOUT_OUTPUT»(problem, interpretation, source, target); 393 find outputReflexive_must_to_true_by_straight(problem, interpretation, source, target, _);
142 } or { 394 } or {
143 // turnoutOutputsAreSame unit propagation 395 find turnoutOutputsAreSame_must_to_true_by_straight(problem, interpretation, source, target, _);
144 «commonParameterConstraints» 396 } or {
145 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")» 397 find tooManyInputsOfSegment_must_to_true_by_straight(problem, interpretation, source, target, _);
146 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")» 398 } or {
147 «referRelation(divergentRelation, "source", "target", Modality.MUST, fqnToPQuery)» 399 find turnoutConnectedToBothOutputs_must_to_true_by_straight(problem, interpretation, source, target, _);
148 } or { 400 } or {
149 // turnoutConnectedToBothOutputs unit propagation 401 find tooManyInputsOfTurnout_must_to_true_by_straight(problem, interpretation, source, target, _);
150 «commonParameterConstraints»
151 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
152 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
153 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "divergent")»
154 «referRelation(connectedToRelation, "source", "target", Modality.MUST, fqnToPQuery)»
155 «referRelation(divergentRelation, "source", "divergent", Modality.MUST, fqnToPQuery)»
156 «referRelation(connectedToRelation, "source", "divergent", Modality.MUST, fqnToPQuery)»
157 } or {
158 // tooManyExtraInputsOfTurnout unit propagation
159 «commonParameterConstraints»
160 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
161 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
162 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "extraInput")»
163 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "potentialExtraInput")»
164 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(ExtraInputOfTurnout.instance.fullyQualifiedName), #["source", "extraInput"], Modality.MUST, true, false)»
165 «referRelation(connectedToRelation, "source", "potentialExtraInput", Modality.MUST, fqnToPQuery)»
166 neg «referRelation(divergentRelation, "source", "potentialExtraInput", Modality.MAY, fqnToPQuery)»
167 extraInput != potentialExtraInput;
168 extraInput != target;
169 potentialExtraInput != target;
170 } 402 }
171 403
172 pattern «MUST_NOT_DIVERGENT»(«parameters») { 404 pattern «MUST_NOT_DIVERGENT»(«parameters») {
173 find «MUST_NOT_TURNOUT_OUTPUT»(problem, interpretation, source, target); 405 find outputReflexive_must_to_true_by_divergent(problem, interpretation, source, target, _);
174 } or { 406 } or {
175 // turnoutOutputsAreSame unit propagation 407 find turnoutOutputsAreSame_must_to_true_by_divergent(problem, interpretation, source, target, _);
176 «commonParameterConstraints» 408 } or {
177 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")» 409 find tooManyInputsOfSegment_must_to_true_by_divergent(problem, interpretation, source, target, _);
178 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")» 410 } or {
179 «referRelation(straightRelation, "source", "target", Modality.MUST, fqnToPQuery)» 411 find turnoutConnectedToBothOutputs_must_to_true_by_divergent(problem, interpretation, source, target, _);
180 } or { 412 } or {
181 // turnoutConnectedToBothOutputs unit propagation 413 find tooManyInputsOfTurnout_must_to_true_by_divergent(problem, interpretation, source, target, _);
182 «commonParameterConstraints»
183 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
184 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
185 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "straight")»
186 «referRelation(connectedToRelation, "source", "target", Modality.MUST, fqnToPQuery)»
187 «referRelation(straightRelation, "source", "straight", Modality.MUST, fqnToPQuery)»
188 «referRelation(connectedToRelation, "source", "straight", Modality.MUST, fqnToPQuery)»
189 } or {
190 // tooManyExtraInputsOfTurnout unit propagation
191 «commonParameterConstraints»
192 «typeIndexer.referInstanceOf(turnoutType, Modality.MUST, "source")»
193 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "target")»
194 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "extraInput")»
195 «typeIndexer.referInstanceOf(segmentType, Modality.MUST, "potentialExtraInput")»
196 «relationDefinitionIndexer.referPattern(fqnToPQuery.get(ExtraInputOfTurnout.instance.fullyQualifiedName), #["source", "extraInput"], Modality.MUST, true, false)»
197 «referRelation(connectedToRelation, "source", "potentialExtraInput", Modality.MUST, fqnToPQuery)»
198 neg «referRelation(straightRelation, "source", "potentialExtraInput", Modality.MAY, fqnToPQuery)»
199 extraInput != potentialExtraInput;
200 extraInput != target;
201 potentialExtraInput != target;
202 } 414 }
203 ''' 415 '''
204 } 416 }
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore
index e3a0ad7e..b3e38571 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore
@@ -24,3 +24,10 @@
24/.ExtraInputOfTurnout.java._trace 24/.ExtraInputOfTurnout.java._trace
25/.NoExtraInputOfTurnout.java._trace 25/.NoExtraInputOfTurnout.java._trace
26/.TooManyExtraInputsOfTurnout.java._trace 26/.TooManyExtraInputsOfTurnout.java._trace
27/.TooManyInputsOfTurnout.java._trace
28/.NonDivergentInputOfTurnout.java._trace
29/.NonStraightInputOfTurnout.java._trace
30/.TooManyNonDivergentInputsOfTurnout.java._trace
31/.TooManyNonStraightInputsOfTurnout.java._trace
32/.InputsOfTurnout.java._trace
33/.TooFewInputsOfTurnout.java._trace
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/ExtraInputOfTurnout.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/ExtraInputOfTurnout.java
deleted file mode 100644
index 62e2a54d..00000000
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/ExtraInputOfTurnout.java
+++ /dev/null
@@ -1,730 +0,0 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql
3 */
4package modes3.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import modes3.Segment;
17import modes3.Turnout;
18import modes3.queries.Output;
19import org.apache.log4j.Logger;
20import org.eclipse.emf.ecore.EClass;
21import org.eclipse.viatra.query.runtime.api.IPatternMatch;
22import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
25import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
26import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
27import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
28import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
29import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
30import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
32import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
37import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
38import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
39import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
40import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
41import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
42import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
43import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
44
45/**
46 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
47 *
48 * <p>Original source:
49 * <code><pre>
50 * pattern extraInputOfTurnout(T : Turnout, S : Segment) {
51 * Turnout.straight(T, Straight);
52 * Turnout.divergent(T, Divergent);
53 * find output(S, T);
54 * S != Straight;
55 * S != Divergent;
56 * }
57 * </pre></code>
58 *
59 * @see Matcher
60 * @see Match
61 *
62 */
63@SuppressWarnings("all")
64public final class ExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecification<ExtraInputOfTurnout.Matcher> {
65 /**
66 * Pattern-specific match representation of the modes3.queries.extraInputOfTurnout pattern,
67 * to be used in conjunction with {@link Matcher}.
68 *
69 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
70 * Each instance is a (possibly partial) substitution of pattern parameters,
71 * usable to represent a match of the pattern in the result of a query,
72 * or to specify the bound (fixed) input parameters when issuing a query.
73 *
74 * @see Matcher
75 *
76 */
77 public static abstract class Match extends BasePatternMatch {
78 private Turnout fT;
79
80 private Segment fS;
81
82 private static List<String> parameterNames = makeImmutableList("T", "S");
83
84 private Match(final Turnout pT, final Segment pS) {
85 this.fT = pT;
86 this.fS = pS;
87 }
88
89 @Override
90 public Object get(final String parameterName) {
91 switch(parameterName) {
92 case "T": return this.fT;
93 case "S": return this.fS;
94 default: return null;
95 }
96 }
97
98 @Override
99 public Object get(final int index) {
100 switch(index) {
101 case 0: return this.fT;
102 case 1: return this.fS;
103 default: return null;
104 }
105 }
106
107 public Turnout getT() {
108 return this.fT;
109 }
110
111 public Segment getS() {
112 return this.fS;
113 }
114
115 @Override
116 public boolean set(final String parameterName, final Object newValue) {
117 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
118 if ("T".equals(parameterName) ) {
119 this.fT = (Turnout) newValue;
120 return true;
121 }
122 if ("S".equals(parameterName) ) {
123 this.fS = (Segment) newValue;
124 return true;
125 }
126 return false;
127 }
128
129 public void setT(final Turnout pT) {
130 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
131 this.fT = pT;
132 }
133
134 public void setS(final Segment pS) {
135 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
136 this.fS = pS;
137 }
138
139 @Override
140 public String patternName() {
141 return "modes3.queries.extraInputOfTurnout";
142 }
143
144 @Override
145 public List<String> parameterNames() {
146 return ExtraInputOfTurnout.Match.parameterNames;
147 }
148
149 @Override
150 public Object[] toArray() {
151 return new Object[]{fT, fS};
152 }
153
154 @Override
155 public ExtraInputOfTurnout.Match toImmutable() {
156 return isMutable() ? newMatch(fT, fS) : this;
157 }
158
159 @Override
160 public String prettyPrint() {
161 StringBuilder result = new StringBuilder();
162 result.append("\"T\"=" + prettyPrintValue(fT) + ", ");
163 result.append("\"S\"=" + prettyPrintValue(fS));
164 return result.toString();
165 }
166
167 @Override
168 public int hashCode() {
169 return Objects.hash(fT, fS);
170 }
171
172 @Override
173 public boolean equals(final Object obj) {
174 if (this == obj)
175 return true;
176 if (obj == null) {
177 return false;
178 }
179 if ((obj instanceof ExtraInputOfTurnout.Match)) {
180 ExtraInputOfTurnout.Match other = (ExtraInputOfTurnout.Match) obj;
181 return Objects.equals(fT, other.fT) && Objects.equals(fS, other.fS);
182 } else {
183 // this should be infrequent
184 if (!(obj instanceof IPatternMatch)) {
185 return false;
186 }
187 IPatternMatch otherSig = (IPatternMatch) obj;
188 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
189 }
190 }
191
192 @Override
193 public ExtraInputOfTurnout specification() {
194 return ExtraInputOfTurnout.instance();
195 }
196
197 /**
198 * Returns an empty, mutable match.
199 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
200 *
201 * @return the empty match.
202 *
203 */
204 public static ExtraInputOfTurnout.Match newEmptyMatch() {
205 return new Mutable(null, null);
206 }
207
208 /**
209 * Returns a mutable (partial) match.
210 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
211 *
212 * @param pT the fixed value of pattern parameter T, or null if not bound.
213 * @param pS the fixed value of pattern parameter S, or null if not bound.
214 * @return the new, mutable (partial) match object.
215 *
216 */
217 public static ExtraInputOfTurnout.Match newMutableMatch(final Turnout pT, final Segment pS) {
218 return new Mutable(pT, pS);
219 }
220
221 /**
222 * Returns a new (partial) match.
223 * This can be used e.g. to call the matcher with a partial match.
224 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
225 * @param pT the fixed value of pattern parameter T, or null if not bound.
226 * @param pS the fixed value of pattern parameter S, or null if not bound.
227 * @return the (partial) match object.
228 *
229 */
230 public static ExtraInputOfTurnout.Match newMatch(final Turnout pT, final Segment pS) {
231 return new Immutable(pT, pS);
232 }
233
234 private static final class Mutable extends ExtraInputOfTurnout.Match {
235 Mutable(final Turnout pT, final Segment pS) {
236 super(pT, pS);
237 }
238
239 @Override
240 public boolean isMutable() {
241 return true;
242 }
243 }
244
245 private static final class Immutable extends ExtraInputOfTurnout.Match {
246 Immutable(final Turnout pT, final Segment pS) {
247 super(pT, pS);
248 }
249
250 @Override
251 public boolean isMutable() {
252 return false;
253 }
254 }
255 }
256
257 /**
258 * Generated pattern matcher API of the modes3.queries.extraInputOfTurnout pattern,
259 * providing pattern-specific query methods.
260 *
261 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
262 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
263 *
264 * <p>Matches of the pattern will be represented as {@link Match}.
265 *
266 * <p>Original source:
267 * <code><pre>
268 * pattern extraInputOfTurnout(T : Turnout, S : Segment) {
269 * Turnout.straight(T, Straight);
270 * Turnout.divergent(T, Divergent);
271 * find output(S, T);
272 * S != Straight;
273 * S != Divergent;
274 * }
275 * </pre></code>
276 *
277 * @see Match
278 * @see ExtraInputOfTurnout
279 *
280 */
281 public static class Matcher extends BaseMatcher<ExtraInputOfTurnout.Match> {
282 /**
283 * Initializes the pattern matcher within an existing VIATRA Query engine.
284 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
285 *
286 * @param engine the existing VIATRA Query engine in which this matcher will be created.
287 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
288 *
289 */
290 public static ExtraInputOfTurnout.Matcher on(final ViatraQueryEngine engine) {
291 // check if matcher already exists
292 Matcher matcher = engine.getExistingMatcher(querySpecification());
293 if (matcher == null) {
294 matcher = (Matcher)engine.getMatcher(querySpecification());
295 }
296 return matcher;
297 }
298
299 /**
300 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
301 * @return an initialized matcher
302 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
303 *
304 */
305 public static ExtraInputOfTurnout.Matcher create() {
306 return new Matcher();
307 }
308
309 private static final int POSITION_T = 0;
310
311 private static final int POSITION_S = 1;
312
313 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(ExtraInputOfTurnout.Matcher.class);
314
315 /**
316 * Initializes the pattern matcher within an existing VIATRA Query engine.
317 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
318 *
319 * @param engine the existing VIATRA Query engine in which this matcher will be created.
320 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
321 *
322 */
323 private Matcher() {
324 super(querySpecification());
325 }
326
327 /**
328 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
329 * @param pT the fixed value of pattern parameter T, or null if not bound.
330 * @param pS the fixed value of pattern parameter S, or null if not bound.
331 * @return matches represented as a Match object.
332 *
333 */
334 public Collection<ExtraInputOfTurnout.Match> getAllMatches(final Turnout pT, final Segment pS) {
335 return rawStreamAllMatches(new Object[]{pT, pS}).collect(Collectors.toSet());
336 }
337
338 /**
339 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
340 * </p>
341 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
342 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
343 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
344 * @param pT the fixed value of pattern parameter T, or null if not bound.
345 * @param pS the fixed value of pattern parameter S, or null if not bound.
346 * @return a stream of matches represented as a Match object.
347 *
348 */
349 public Stream<ExtraInputOfTurnout.Match> streamAllMatches(final Turnout pT, final Segment pS) {
350 return rawStreamAllMatches(new Object[]{pT, pS});
351 }
352
353 /**
354 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
355 * Neither determinism nor randomness of selection is guaranteed.
356 * @param pT the fixed value of pattern parameter T, or null if not bound.
357 * @param pS the fixed value of pattern parameter S, or null if not bound.
358 * @return a match represented as a Match object, or null if no match is found.
359 *
360 */
361 public Optional<ExtraInputOfTurnout.Match> getOneArbitraryMatch(final Turnout pT, final Segment pS) {
362 return rawGetOneArbitraryMatch(new Object[]{pT, pS});
363 }
364
365 /**
366 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
367 * under any possible substitution of the unspecified parameters (if any).
368 * @param pT the fixed value of pattern parameter T, or null if not bound.
369 * @param pS the fixed value of pattern parameter S, or null if not bound.
370 * @return true if the input is a valid (partial) match of the pattern.
371 *
372 */
373 public boolean hasMatch(final Turnout pT, final Segment pS) {
374 return rawHasMatch(new Object[]{pT, pS});
375 }
376
377 /**
378 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
379 * @param pT the fixed value of pattern parameter T, or null if not bound.
380 * @param pS the fixed value of pattern parameter S, or null if not bound.
381 * @return the number of pattern matches found.
382 *
383 */
384 public int countMatches(final Turnout pT, final Segment pS) {
385 return rawCountMatches(new Object[]{pT, pS});
386 }
387
388 /**
389 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
390 * Neither determinism nor randomness of selection is guaranteed.
391 * @param pT the fixed value of pattern parameter T, or null if not bound.
392 * @param pS the fixed value of pattern parameter S, or null if not bound.
393 * @param processor the action that will process the selected match.
394 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
395 *
396 */
397 public boolean forOneArbitraryMatch(final Turnout pT, final Segment pS, final Consumer<? super ExtraInputOfTurnout.Match> processor) {
398 return rawForOneArbitraryMatch(new Object[]{pT, pS}, processor);
399 }
400
401 /**
402 * Returns a new (partial) match.
403 * This can be used e.g. to call the matcher with a partial match.
404 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
405 * @param pT the fixed value of pattern parameter T, or null if not bound.
406 * @param pS the fixed value of pattern parameter S, or null if not bound.
407 * @return the (partial) match object.
408 *
409 */
410 public ExtraInputOfTurnout.Match newMatch(final Turnout pT, final Segment pS) {
411 return ExtraInputOfTurnout.Match.newMatch(pT, pS);
412 }
413
414 /**
415 * Retrieve the set of values that occur in matches for T.
416 * @return the Set of all values or empty set if there are no matches
417 *
418 */
419 protected Stream<Turnout> rawStreamAllValuesOfT(final Object[] parameters) {
420 return rawStreamAllValues(POSITION_T, parameters).map(Turnout.class::cast);
421 }
422
423 /**
424 * Retrieve the set of values that occur in matches for T.
425 * @return the Set of all values or empty set if there are no matches
426 *
427 */
428 public Set<Turnout> getAllValuesOfT() {
429 return rawStreamAllValuesOfT(emptyArray()).collect(Collectors.toSet());
430 }
431
432 /**
433 * Retrieve the set of values that occur in matches for T.
434 * @return the Set of all values or empty set if there are no matches
435 *
436 */
437 public Stream<Turnout> streamAllValuesOfT() {
438 return rawStreamAllValuesOfT(emptyArray());
439 }
440
441 /**
442 * Retrieve the set of values that occur in matches for T.
443 * </p>
444 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
445 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
446 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
447 *
448 * @return the Stream of all values or empty set if there are no matches
449 *
450 */
451 public Stream<Turnout> streamAllValuesOfT(final ExtraInputOfTurnout.Match partialMatch) {
452 return rawStreamAllValuesOfT(partialMatch.toArray());
453 }
454
455 /**
456 * Retrieve the set of values that occur in matches for T.
457 * </p>
458 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
459 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
460 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
461 *
462 * @return the Stream of all values or empty set if there are no matches
463 *
464 */
465 public Stream<Turnout> streamAllValuesOfT(final Segment pS) {
466 return rawStreamAllValuesOfT(new Object[]{null, pS});
467 }
468
469 /**
470 * Retrieve the set of values that occur in matches for T.
471 * @return the Set of all values or empty set if there are no matches
472 *
473 */
474 public Set<Turnout> getAllValuesOfT(final ExtraInputOfTurnout.Match partialMatch) {
475 return rawStreamAllValuesOfT(partialMatch.toArray()).collect(Collectors.toSet());
476 }
477
478 /**
479 * Retrieve the set of values that occur in matches for T.
480 * @return the Set of all values or empty set if there are no matches
481 *
482 */
483 public Set<Turnout> getAllValuesOfT(final Segment pS) {
484 return rawStreamAllValuesOfT(new Object[]{null, pS}).collect(Collectors.toSet());
485 }
486
487 /**
488 * Retrieve the set of values that occur in matches for S.
489 * @return the Set of all values or empty set if there are no matches
490 *
491 */
492 protected Stream<Segment> rawStreamAllValuesOfS(final Object[] parameters) {
493 return rawStreamAllValues(POSITION_S, parameters).map(Segment.class::cast);
494 }
495
496 /**
497 * Retrieve the set of values that occur in matches for S.
498 * @return the Set of all values or empty set if there are no matches
499 *
500 */
501 public Set<Segment> getAllValuesOfS() {
502 return rawStreamAllValuesOfS(emptyArray()).collect(Collectors.toSet());
503 }
504
505 /**
506 * Retrieve the set of values that occur in matches for S.
507 * @return the Set of all values or empty set if there are no matches
508 *
509 */
510 public Stream<Segment> streamAllValuesOfS() {
511 return rawStreamAllValuesOfS(emptyArray());
512 }
513
514 /**
515 * Retrieve the set of values that occur in matches for S.
516 * </p>
517 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
518 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
519 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
520 *
521 * @return the Stream of all values or empty set if there are no matches
522 *
523 */
524 public Stream<Segment> streamAllValuesOfS(final ExtraInputOfTurnout.Match partialMatch) {
525 return rawStreamAllValuesOfS(partialMatch.toArray());
526 }
527
528 /**
529 * Retrieve the set of values that occur in matches for S.
530 * </p>
531 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
532 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
533 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
534 *
535 * @return the Stream of all values or empty set if there are no matches
536 *
537 */
538 public Stream<Segment> streamAllValuesOfS(final Turnout pT) {
539 return rawStreamAllValuesOfS(new Object[]{pT, null});
540 }
541
542 /**
543 * Retrieve the set of values that occur in matches for S.
544 * @return the Set of all values or empty set if there are no matches
545 *
546 */
547 public Set<Segment> getAllValuesOfS(final ExtraInputOfTurnout.Match partialMatch) {
548 return rawStreamAllValuesOfS(partialMatch.toArray()).collect(Collectors.toSet());
549 }
550
551 /**
552 * Retrieve the set of values that occur in matches for S.
553 * @return the Set of all values or empty set if there are no matches
554 *
555 */
556 public Set<Segment> getAllValuesOfS(final Turnout pT) {
557 return rawStreamAllValuesOfS(new Object[]{pT, null}).collect(Collectors.toSet());
558 }
559
560 @Override
561 protected ExtraInputOfTurnout.Match tupleToMatch(final Tuple t) {
562 try {
563 return ExtraInputOfTurnout.Match.newMatch((Turnout) t.get(POSITION_T), (Segment) t.get(POSITION_S));
564 } catch(ClassCastException e) {
565 LOGGER.error("Element(s) in tuple not properly typed!",e);
566 return null;
567 }
568 }
569
570 @Override
571 protected ExtraInputOfTurnout.Match arrayToMatch(final Object[] match) {
572 try {
573 return ExtraInputOfTurnout.Match.newMatch((Turnout) match[POSITION_T], (Segment) match[POSITION_S]);
574 } catch(ClassCastException e) {
575 LOGGER.error("Element(s) in array not properly typed!",e);
576 return null;
577 }
578 }
579
580 @Override
581 protected ExtraInputOfTurnout.Match arrayToMatchMutable(final Object[] match) {
582 try {
583 return ExtraInputOfTurnout.Match.newMutableMatch((Turnout) match[POSITION_T], (Segment) match[POSITION_S]);
584 } catch(ClassCastException e) {
585 LOGGER.error("Element(s) in array not properly typed!",e);
586 return null;
587 }
588 }
589
590 /**
591 * @return the singleton instance of the query specification of this pattern
592 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
593 *
594 */
595 public static IQuerySpecification<ExtraInputOfTurnout.Matcher> querySpecification() {
596 return ExtraInputOfTurnout.instance();
597 }
598 }
599
600 private ExtraInputOfTurnout() {
601 super(GeneratedPQuery.INSTANCE);
602 }
603
604 /**
605 * @return the singleton instance of the query specification
606 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
607 *
608 */
609 public static ExtraInputOfTurnout instance() {
610 try{
611 return LazyHolder.INSTANCE;
612 } catch (ExceptionInInitializerError err) {
613 throw processInitializerError(err);
614 }
615 }
616
617 @Override
618 protected ExtraInputOfTurnout.Matcher instantiate(final ViatraQueryEngine engine) {
619 return ExtraInputOfTurnout.Matcher.on(engine);
620 }
621
622 @Override
623 public ExtraInputOfTurnout.Matcher instantiate() {
624 return ExtraInputOfTurnout.Matcher.create();
625 }
626
627 @Override
628 public ExtraInputOfTurnout.Match newEmptyMatch() {
629 return ExtraInputOfTurnout.Match.newEmptyMatch();
630 }
631
632 @Override
633 public ExtraInputOfTurnout.Match newMatch(final Object... parameters) {
634 return ExtraInputOfTurnout.Match.newMatch((modes3.Turnout) parameters[0], (modes3.Segment) parameters[1]);
635 }
636
637 /**
638 * Inner class allowing the singleton instance of {@link ExtraInputOfTurnout} to be created
639 * <b>not</b> at the class load time of the outer class,
640 * but rather at the first call to {@link ExtraInputOfTurnout#instance()}.
641 *
642 * <p> This workaround is required e.g. to support recursion.
643 *
644 */
645 private static class LazyHolder {
646 private static final ExtraInputOfTurnout INSTANCE = new ExtraInputOfTurnout();
647
648 /**
649 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
650 * This initialization order is required to support indirect recursion.
651 *
652 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
653 *
654 */
655 private static final Object STATIC_INITIALIZER = ensureInitialized();
656
657 public static Object ensureInitialized() {
658 INSTANCE.ensureInitializedInternal();
659 return null;
660 }
661 }
662
663 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
664 private static final ExtraInputOfTurnout.GeneratedPQuery INSTANCE = new GeneratedPQuery();
665
666 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT);
667
668 private final PParameter parameter_S = new PParameter("S", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT);
669
670 private final List<PParameter> parameters = Arrays.asList(parameter_T, parameter_S);
671
672 private GeneratedPQuery() {
673 super(PVisibility.PUBLIC);
674 }
675
676 @Override
677 public String getFullyQualifiedName() {
678 return "modes3.queries.extraInputOfTurnout";
679 }
680
681 @Override
682 public List<String> getParameterNames() {
683 return Arrays.asList("T","S");
684 }
685
686 @Override
687 public List<PParameter> getParameters() {
688 return parameters;
689 }
690
691 @Override
692 public Set<PBody> doGetContainedBodies() {
693 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
694 Set<PBody> bodies = new LinkedHashSet<>();
695 {
696 PBody body = new PBody(this);
697 PVariable var_T = body.getOrCreateVariableByName("T");
698 PVariable var_S = body.getOrCreateVariableByName("S");
699 PVariable var_Straight = body.getOrCreateVariableByName("Straight");
700 PVariable var_Divergent = body.getOrCreateVariableByName("Divergent");
701 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
702 new TypeConstraint(body, Tuples.flatTupleOf(var_S), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment")));
703 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
704 new ExportedParameter(body, var_T, parameter_T),
705 new ExportedParameter(body, var_S, parameter_S)
706 ));
707 // Turnout.straight(T, Straight)
708 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
709 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
710 new TypeConstraint(body, Tuples.flatTupleOf(var_T, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout", "straight")));
711 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment")));
712 new Equality(body, var__virtual_0_, var_Straight);
713 // Turnout.divergent(T, Divergent)
714 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
715 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
716 new TypeConstraint(body, Tuples.flatTupleOf(var_T, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout", "divergent")));
717 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment")));
718 new Equality(body, var__virtual_1_, var_Divergent);
719 // find output(S, T)
720 new PositivePatternCall(body, Tuples.flatTupleOf(var_S, var_T), Output.instance().getInternalQueryRepresentation());
721 // S != Straight
722 new Inequality(body, var_S, var_Straight);
723 // S != Divergent
724 new Inequality(body, var_S, var_Divergent);
725 bodies.add(body);
726 }
727 return bodies;
728 }
729 }
730}
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TurnoutInSegments.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/InputsOfTurnout.java
index 9c9a5d18..2f2eea11 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TurnoutInSegments.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/InputsOfTurnout.java
@@ -14,6 +14,7 @@ import java.util.function.Consumer;
14import java.util.stream.Collectors; 14import java.util.stream.Collectors;
15import java.util.stream.Stream; 15import java.util.stream.Stream;
16import modes3.Turnout; 16import modes3.Turnout;
17import modes3.queries.Adjacent;
17import org.apache.log4j.Logger; 18import org.apache.log4j.Logger;
18import org.eclipse.emf.ecore.EClass; 19import org.eclipse.emf.ecore.EClass;
19import org.eclipse.viatra.query.runtime.api.IPatternMatch; 20import org.eclipse.viatra.query.runtime.api.IPatternMatch;
@@ -24,14 +25,12 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificat
24import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; 25import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
25import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; 26import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
26import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; 27import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
27import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 28import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; 29import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; 30import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
31import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
32import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; 31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 34import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; 36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
@@ -45,9 +44,13 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
45 * 44 *
46 * <p>Original source: 45 * <p>Original source:
47 * <code><pre> 46 * <code><pre>
48 * {@literal @}Constraint(message = "turnoutInSegments", severity = "error", key = { T }) 47 * pattern inputsOfTurnout(T : Turnout) {
49 * pattern turnoutInSegments(T : Turnout) { 48 * find adjacent(I1, T);
50 * Modes3ModelRoot.segments(_, T); 49 * find adjacent(I2, T);
50 * find adjacent(I3, T);
51 * I1 != I2;
52 * I1 != I3;
53 * I2 != I3;
51 * } 54 * }
52 * </pre></code> 55 * </pre></code>
53 * 56 *
@@ -56,9 +59,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
56 * 59 *
57 */ 60 */
58@SuppressWarnings("all") 61@SuppressWarnings("all")
59public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<TurnoutInSegments.Matcher> { 62public final class InputsOfTurnout extends BaseGeneratedEMFQuerySpecification<InputsOfTurnout.Matcher> {
60 /** 63 /**
61 * Pattern-specific match representation of the modes3.queries.turnoutInSegments pattern, 64 * Pattern-specific match representation of the modes3.queries.inputsOfTurnout pattern,
62 * to be used in conjunction with {@link Matcher}. 65 * to be used in conjunction with {@link Matcher}.
63 * 66 *
64 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. 67 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
@@ -115,12 +118,12 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
115 118
116 @Override 119 @Override
117 public String patternName() { 120 public String patternName() {
118 return "modes3.queries.turnoutInSegments"; 121 return "modes3.queries.inputsOfTurnout";
119 } 122 }
120 123
121 @Override 124 @Override
122 public List<String> parameterNames() { 125 public List<String> parameterNames() {
123 return TurnoutInSegments.Match.parameterNames; 126 return InputsOfTurnout.Match.parameterNames;
124 } 127 }
125 128
126 @Override 129 @Override
@@ -129,7 +132,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
129 } 132 }
130 133
131 @Override 134 @Override
132 public TurnoutInSegments.Match toImmutable() { 135 public InputsOfTurnout.Match toImmutable() {
133 return isMutable() ? newMatch(fT) : this; 136 return isMutable() ? newMatch(fT) : this;
134 } 137 }
135 138
@@ -152,8 +155,8 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
152 if (obj == null) { 155 if (obj == null) {
153 return false; 156 return false;
154 } 157 }
155 if ((obj instanceof TurnoutInSegments.Match)) { 158 if ((obj instanceof InputsOfTurnout.Match)) {
156 TurnoutInSegments.Match other = (TurnoutInSegments.Match) obj; 159 InputsOfTurnout.Match other = (InputsOfTurnout.Match) obj;
157 return Objects.equals(fT, other.fT); 160 return Objects.equals(fT, other.fT);
158 } else { 161 } else {
159 // this should be infrequent 162 // this should be infrequent
@@ -166,8 +169,8 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
166 } 169 }
167 170
168 @Override 171 @Override
169 public TurnoutInSegments specification() { 172 public InputsOfTurnout specification() {
170 return TurnoutInSegments.instance(); 173 return InputsOfTurnout.instance();
171 } 174 }
172 175
173 /** 176 /**
@@ -177,7 +180,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
177 * @return the empty match. 180 * @return the empty match.
178 * 181 *
179 */ 182 */
180 public static TurnoutInSegments.Match newEmptyMatch() { 183 public static InputsOfTurnout.Match newEmptyMatch() {
181 return new Mutable(null); 184 return new Mutable(null);
182 } 185 }
183 186
@@ -189,7 +192,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
189 * @return the new, mutable (partial) match object. 192 * @return the new, mutable (partial) match object.
190 * 193 *
191 */ 194 */
192 public static TurnoutInSegments.Match newMutableMatch(final Turnout pT) { 195 public static InputsOfTurnout.Match newMutableMatch(final Turnout pT) {
193 return new Mutable(pT); 196 return new Mutable(pT);
194 } 197 }
195 198
@@ -201,11 +204,11 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
201 * @return the (partial) match object. 204 * @return the (partial) match object.
202 * 205 *
203 */ 206 */
204 public static TurnoutInSegments.Match newMatch(final Turnout pT) { 207 public static InputsOfTurnout.Match newMatch(final Turnout pT) {
205 return new Immutable(pT); 208 return new Immutable(pT);
206 } 209 }
207 210
208 private static final class Mutable extends TurnoutInSegments.Match { 211 private static final class Mutable extends InputsOfTurnout.Match {
209 Mutable(final Turnout pT) { 212 Mutable(final Turnout pT) {
210 super(pT); 213 super(pT);
211 } 214 }
@@ -216,7 +219,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
216 } 219 }
217 } 220 }
218 221
219 private static final class Immutable extends TurnoutInSegments.Match { 222 private static final class Immutable extends InputsOfTurnout.Match {
220 Immutable(final Turnout pT) { 223 Immutable(final Turnout pT) {
221 super(pT); 224 super(pT);
222 } 225 }
@@ -229,7 +232,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
229 } 232 }
230 233
231 /** 234 /**
232 * Generated pattern matcher API of the modes3.queries.turnoutInSegments pattern, 235 * Generated pattern matcher API of the modes3.queries.inputsOfTurnout pattern,
233 * providing pattern-specific query methods. 236 * providing pattern-specific query methods.
234 * 237 *
235 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, 238 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
@@ -239,17 +242,21 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
239 * 242 *
240 * <p>Original source: 243 * <p>Original source:
241 * <code><pre> 244 * <code><pre>
242 * {@literal @}Constraint(message = "turnoutInSegments", severity = "error", key = { T }) 245 * pattern inputsOfTurnout(T : Turnout) {
243 * pattern turnoutInSegments(T : Turnout) { 246 * find adjacent(I1, T);
244 * Modes3ModelRoot.segments(_, T); 247 * find adjacent(I2, T);
248 * find adjacent(I3, T);
249 * I1 != I2;
250 * I1 != I3;
251 * I2 != I3;
245 * } 252 * }
246 * </pre></code> 253 * </pre></code>
247 * 254 *
248 * @see Match 255 * @see Match
249 * @see TurnoutInSegments 256 * @see InputsOfTurnout
250 * 257 *
251 */ 258 */
252 public static class Matcher extends BaseMatcher<TurnoutInSegments.Match> { 259 public static class Matcher extends BaseMatcher<InputsOfTurnout.Match> {
253 /** 260 /**
254 * Initializes the pattern matcher within an existing VIATRA Query engine. 261 * Initializes the pattern matcher within an existing VIATRA Query engine.
255 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. 262 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
@@ -258,7 +265,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
258 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation 265 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
259 * 266 *
260 */ 267 */
261 public static TurnoutInSegments.Matcher on(final ViatraQueryEngine engine) { 268 public static InputsOfTurnout.Matcher on(final ViatraQueryEngine engine) {
262 // check if matcher already exists 269 // check if matcher already exists
263 Matcher matcher = engine.getExistingMatcher(querySpecification()); 270 Matcher matcher = engine.getExistingMatcher(querySpecification());
264 if (matcher == null) { 271 if (matcher == null) {
@@ -273,13 +280,13 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
273 * @noreference This method is for internal matcher initialization by the framework, do not call it manually. 280 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
274 * 281 *
275 */ 282 */
276 public static TurnoutInSegments.Matcher create() { 283 public static InputsOfTurnout.Matcher create() {
277 return new Matcher(); 284 return new Matcher();
278 } 285 }
279 286
280 private static final int POSITION_T = 0; 287 private static final int POSITION_T = 0;
281 288
282 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TurnoutInSegments.Matcher.class); 289 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(InputsOfTurnout.Matcher.class);
283 290
284 /** 291 /**
285 * Initializes the pattern matcher within an existing VIATRA Query engine. 292 * Initializes the pattern matcher within an existing VIATRA Query engine.
@@ -299,7 +306,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
299 * @return matches represented as a Match object. 306 * @return matches represented as a Match object.
300 * 307 *
301 */ 308 */
302 public Collection<TurnoutInSegments.Match> getAllMatches(final Turnout pT) { 309 public Collection<InputsOfTurnout.Match> getAllMatches(final Turnout pT) {
303 return rawStreamAllMatches(new Object[]{pT}).collect(Collectors.toSet()); 310 return rawStreamAllMatches(new Object[]{pT}).collect(Collectors.toSet());
304 } 311 }
305 312
@@ -313,7 +320,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
313 * @return a stream of matches represented as a Match object. 320 * @return a stream of matches represented as a Match object.
314 * 321 *
315 */ 322 */
316 public Stream<TurnoutInSegments.Match> streamAllMatches(final Turnout pT) { 323 public Stream<InputsOfTurnout.Match> streamAllMatches(final Turnout pT) {
317 return rawStreamAllMatches(new Object[]{pT}); 324 return rawStreamAllMatches(new Object[]{pT});
318 } 325 }
319 326
@@ -324,7 +331,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
324 * @return a match represented as a Match object, or null if no match is found. 331 * @return a match represented as a Match object, or null if no match is found.
325 * 332 *
326 */ 333 */
327 public Optional<TurnoutInSegments.Match> getOneArbitraryMatch(final Turnout pT) { 334 public Optional<InputsOfTurnout.Match> getOneArbitraryMatch(final Turnout pT) {
328 return rawGetOneArbitraryMatch(new Object[]{pT}); 335 return rawGetOneArbitraryMatch(new Object[]{pT});
329 } 336 }
330 337
@@ -357,7 +364,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
357 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 364 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
358 * 365 *
359 */ 366 */
360 public boolean forOneArbitraryMatch(final Turnout pT, final Consumer<? super TurnoutInSegments.Match> processor) { 367 public boolean forOneArbitraryMatch(final Turnout pT, final Consumer<? super InputsOfTurnout.Match> processor) {
361 return rawForOneArbitraryMatch(new Object[]{pT}, processor); 368 return rawForOneArbitraryMatch(new Object[]{pT}, processor);
362 } 369 }
363 370
@@ -369,8 +376,8 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
369 * @return the (partial) match object. 376 * @return the (partial) match object.
370 * 377 *
371 */ 378 */
372 public TurnoutInSegments.Match newMatch(final Turnout pT) { 379 public InputsOfTurnout.Match newMatch(final Turnout pT) {
373 return TurnoutInSegments.Match.newMatch(pT); 380 return InputsOfTurnout.Match.newMatch(pT);
374 } 381 }
375 382
376 /** 383 /**
@@ -401,9 +408,9 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
401 } 408 }
402 409
403 @Override 410 @Override
404 protected TurnoutInSegments.Match tupleToMatch(final Tuple t) { 411 protected InputsOfTurnout.Match tupleToMatch(final Tuple t) {
405 try { 412 try {
406 return TurnoutInSegments.Match.newMatch((Turnout) t.get(POSITION_T)); 413 return InputsOfTurnout.Match.newMatch((Turnout) t.get(POSITION_T));
407 } catch(ClassCastException e) { 414 } catch(ClassCastException e) {
408 LOGGER.error("Element(s) in tuple not properly typed!",e); 415 LOGGER.error("Element(s) in tuple not properly typed!",e);
409 return null; 416 return null;
@@ -411,9 +418,9 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
411 } 418 }
412 419
413 @Override 420 @Override
414 protected TurnoutInSegments.Match arrayToMatch(final Object[] match) { 421 protected InputsOfTurnout.Match arrayToMatch(final Object[] match) {
415 try { 422 try {
416 return TurnoutInSegments.Match.newMatch((Turnout) match[POSITION_T]); 423 return InputsOfTurnout.Match.newMatch((Turnout) match[POSITION_T]);
417 } catch(ClassCastException e) { 424 } catch(ClassCastException e) {
418 LOGGER.error("Element(s) in array not properly typed!",e); 425 LOGGER.error("Element(s) in array not properly typed!",e);
419 return null; 426 return null;
@@ -421,9 +428,9 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
421 } 428 }
422 429
423 @Override 430 @Override
424 protected TurnoutInSegments.Match arrayToMatchMutable(final Object[] match) { 431 protected InputsOfTurnout.Match arrayToMatchMutable(final Object[] match) {
425 try { 432 try {
426 return TurnoutInSegments.Match.newMutableMatch((Turnout) match[POSITION_T]); 433 return InputsOfTurnout.Match.newMutableMatch((Turnout) match[POSITION_T]);
427 } catch(ClassCastException e) { 434 } catch(ClassCastException e) {
428 LOGGER.error("Element(s) in array not properly typed!",e); 435 LOGGER.error("Element(s) in array not properly typed!",e);
429 return null; 436 return null;
@@ -435,12 +442,12 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
435 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 442 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
436 * 443 *
437 */ 444 */
438 public static IQuerySpecification<TurnoutInSegments.Matcher> querySpecification() { 445 public static IQuerySpecification<InputsOfTurnout.Matcher> querySpecification() {
439 return TurnoutInSegments.instance(); 446 return InputsOfTurnout.instance();
440 } 447 }
441 } 448 }
442 449
443 private TurnoutInSegments() { 450 private InputsOfTurnout() {
444 super(GeneratedPQuery.INSTANCE); 451 super(GeneratedPQuery.INSTANCE);
445 } 452 }
446 453
@@ -449,7 +456,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
449 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 456 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
450 * 457 *
451 */ 458 */
452 public static TurnoutInSegments instance() { 459 public static InputsOfTurnout instance() {
453 try{ 460 try{
454 return LazyHolder.INSTANCE; 461 return LazyHolder.INSTANCE;
455 } catch (ExceptionInInitializerError err) { 462 } catch (ExceptionInInitializerError err) {
@@ -458,35 +465,35 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
458 } 465 }
459 466
460 @Override 467 @Override
461 protected TurnoutInSegments.Matcher instantiate(final ViatraQueryEngine engine) { 468 protected InputsOfTurnout.Matcher instantiate(final ViatraQueryEngine engine) {
462 return TurnoutInSegments.Matcher.on(engine); 469 return InputsOfTurnout.Matcher.on(engine);
463 } 470 }
464 471
465 @Override 472 @Override
466 public TurnoutInSegments.Matcher instantiate() { 473 public InputsOfTurnout.Matcher instantiate() {
467 return TurnoutInSegments.Matcher.create(); 474 return InputsOfTurnout.Matcher.create();
468 } 475 }
469 476
470 @Override 477 @Override
471 public TurnoutInSegments.Match newEmptyMatch() { 478 public InputsOfTurnout.Match newEmptyMatch() {
472 return TurnoutInSegments.Match.newEmptyMatch(); 479 return InputsOfTurnout.Match.newEmptyMatch();
473 } 480 }
474 481
475 @Override 482 @Override
476 public TurnoutInSegments.Match newMatch(final Object... parameters) { 483 public InputsOfTurnout.Match newMatch(final Object... parameters) {
477 return TurnoutInSegments.Match.newMatch((modes3.Turnout) parameters[0]); 484 return InputsOfTurnout.Match.newMatch((modes3.Turnout) parameters[0]);
478 } 485 }
479 486
480 /** 487 /**
481 * Inner class allowing the singleton instance of {@link TurnoutInSegments} to be created 488 * Inner class allowing the singleton instance of {@link InputsOfTurnout} to be created
482 * <b>not</b> at the class load time of the outer class, 489 * <b>not</b> at the class load time of the outer class,
483 * but rather at the first call to {@link TurnoutInSegments#instance()}. 490 * but rather at the first call to {@link InputsOfTurnout#instance()}.
484 * 491 *
485 * <p> This workaround is required e.g. to support recursion. 492 * <p> This workaround is required e.g. to support recursion.
486 * 493 *
487 */ 494 */
488 private static class LazyHolder { 495 private static class LazyHolder {
489 private static final TurnoutInSegments INSTANCE = new TurnoutInSegments(); 496 private static final InputsOfTurnout INSTANCE = new InputsOfTurnout();
490 497
491 /** 498 /**
492 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. 499 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
@@ -504,7 +511,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
504 } 511 }
505 512
506 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 513 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
507 private static final TurnoutInSegments.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 514 private static final InputsOfTurnout.GeneratedPQuery INSTANCE = new GeneratedPQuery();
508 515
509 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT); 516 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT);
510 517
@@ -516,7 +523,7 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
516 523
517 @Override 524 @Override
518 public String getFullyQualifiedName() { 525 public String getFullyQualifiedName() {
519 return "modes3.queries.turnoutInSegments"; 526 return "modes3.queries.inputsOfTurnout";
520 } 527 }
521 528
522 @Override 529 @Override
@@ -536,28 +543,27 @@ public final class TurnoutInSegments extends BaseGeneratedEMFQuerySpecification<
536 { 543 {
537 PBody body = new PBody(this); 544 PBody body = new PBody(this);
538 PVariable var_T = body.getOrCreateVariableByName("T"); 545 PVariable var_T = body.getOrCreateVariableByName("T");
539 PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); 546 PVariable var_I1 = body.getOrCreateVariableByName("I1");
547 PVariable var_I2 = body.getOrCreateVariableByName("I2");
548 PVariable var_I3 = body.getOrCreateVariableByName("I3");
540 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout"))); 549 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
541 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 550 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
542 new ExportedParameter(body, var_T, parameter_T) 551 new ExportedParameter(body, var_T, parameter_T)
543 )); 552 ));
544 // Modes3ModelRoot.segments(_, T) 553 // find adjacent(I1, T)
545 new TypeConstraint(body, Tuples.flatTupleOf(var___0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Modes3ModelRoot"))); 554 new PositivePatternCall(body, Tuples.flatTupleOf(var_I1, var_T), Adjacent.instance().getInternalQueryRepresentation());
546 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); 555 // find adjacent(I2, T)
547 new TypeConstraint(body, Tuples.flatTupleOf(var___0_, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Modes3ModelRoot", "segments"))); 556 new PositivePatternCall(body, Tuples.flatTupleOf(var_I2, var_T), Adjacent.instance().getInternalQueryRepresentation());
548 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); 557 // find adjacent(I3, T)
549 new Equality(body, var__virtual_0_, var_T); 558 new PositivePatternCall(body, Tuples.flatTupleOf(var_I3, var_T), Adjacent.instance().getInternalQueryRepresentation());
559 // I1 != I2
560 new Inequality(body, var_I1, var_I2);
561 // I1 != I3
562 new Inequality(body, var_I1, var_I3);
563 // I2 != I3
564 new Inequality(body, var_I2, var_I3);
550 bodies.add(body); 565 bodies.add(body);
551 } 566 }
552 {
553 PAnnotation annotation = new PAnnotation("Constraint");
554 annotation.addAttribute("message", "turnoutInSegments");
555 annotation.addAttribute("severity", "error");
556 annotation.addAttribute("key", Arrays.asList(new Object[] {
557 new ParameterReference("T")
558 }));
559 addAnnotation(annotation);
560 }
561 return bodies; 567 return bodies;
562 } 568 }
563 } 569 }
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java
index 01ec77a1..6e244430 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java
@@ -7,16 +7,14 @@ import modes3.queries.Adjacent;
7import modes3.queries.ConnectedTo; 7import modes3.queries.ConnectedTo;
8import modes3.queries.ConnectedToNotSymmetric; 8import modes3.queries.ConnectedToNotSymmetric;
9import modes3.queries.ConnectedToReflexive; 9import modes3.queries.ConnectedToReflexive;
10import modes3.queries.ExtraInputOfTurnout; 10import modes3.queries.InputsOfTurnout;
11import modes3.queries.NoExtraInputOfTurnout;
12import modes3.queries.Output; 11import modes3.queries.Output;
13import modes3.queries.OutputReflexive; 12import modes3.queries.OutputReflexive;
14import modes3.queries.Reachable; 13import modes3.queries.Reachable;
15import modes3.queries.TooManyExtraInputsOfTurnout; 14import modes3.queries.TooFewInputsOfTurnout;
16import modes3.queries.TooManyInputsOfSegment; 15import modes3.queries.TooManyInputsOfSegment;
17import modes3.queries.Turnout; 16import modes3.queries.TooManyInputsOfTurnout;
18import modes3.queries.TurnoutConnectedToBothOutputs; 17import modes3.queries.TurnoutConnectedToBothOutputs;
19import modes3.queries.TurnoutInSegments;
20import modes3.queries.TurnoutOutput; 18import modes3.queries.TurnoutOutput;
21import modes3.queries.TurnoutOutputsAreSame; 19import modes3.queries.TurnoutOutputsAreSame;
22import modes3.queries.Unreachable; 20import modes3.queries.Unreachable;
@@ -31,21 +29,19 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup;
31 * in order to achieve better performance than one-by-one on-demand matcher initialization. 29 * in order to achieve better performance than one-by-one on-demand matcher initialization.
32 * 30 *
33 * <p> From package modes3.queries, the group contains the definition of the following patterns: <ul> 31 * <p> From package modes3.queries, the group contains the definition of the following patterns: <ul>
34 * <li>turnoutInSegments</li>
35 * <li>connectedTo</li> 32 * <li>connectedTo</li>
36 * <li>connectedToNotSymmetric</li> 33 * <li>connectedToNotSymmetric</li>
37 * <li>connectedToReflexive</li> 34 * <li>connectedToReflexive</li>
38 * <li>turnoutOutput</li> 35 * <li>turnoutOutput</li>
39 * <li>outputReflexive</li> 36 * <li>outputReflexive</li>
40 * <li>turnoutOutputsAreSame</li> 37 * <li>turnoutOutputsAreSame</li>
41 * <li>turnout</li>
42 * <li>output</li> 38 * <li>output</li>
43 * <li>tooManyInputsOfSegment</li> 39 * <li>tooManyInputsOfSegment</li>
44 * <li>turnoutConnectedToBothOutputs</li> 40 * <li>turnoutConnectedToBothOutputs</li>
45 * <li>extraInputOfTurnout</li>
46 * <li>noExtraInputOfTurnout</li>
47 * <li>tooManyExtraInputsOfTurnout</li>
48 * <li>adjacent</li> 41 * <li>adjacent</li>
42 * <li>tooManyInputsOfTurnout</li>
43 * <li>inputsOfTurnout</li>
44 * <li>tooFewInputsOfTurnout</li>
49 * <li>reachable</li> 45 * <li>reachable</li>
50 * <li>unreachable</li> 46 * <li>unreachable</li>
51 * </ul> 47 * </ul>
@@ -72,33 +68,23 @@ public final class Modes3Queries extends BaseGeneratedPatternGroup {
72 private static Modes3Queries INSTANCE; 68 private static Modes3Queries INSTANCE;
73 69
74 private Modes3Queries() { 70 private Modes3Queries() {
75 querySpecifications.add(TurnoutInSegments.instance());
76 querySpecifications.add(ConnectedTo.instance()); 71 querySpecifications.add(ConnectedTo.instance());
77 querySpecifications.add(ConnectedToNotSymmetric.instance()); 72 querySpecifications.add(ConnectedToNotSymmetric.instance());
78 querySpecifications.add(ConnectedToReflexive.instance()); 73 querySpecifications.add(ConnectedToReflexive.instance());
79 querySpecifications.add(TurnoutOutput.instance()); 74 querySpecifications.add(TurnoutOutput.instance());
80 querySpecifications.add(OutputReflexive.instance()); 75 querySpecifications.add(OutputReflexive.instance());
81 querySpecifications.add(TurnoutOutputsAreSame.instance()); 76 querySpecifications.add(TurnoutOutputsAreSame.instance());
82 querySpecifications.add(Turnout.instance());
83 querySpecifications.add(Output.instance()); 77 querySpecifications.add(Output.instance());
84 querySpecifications.add(TooManyInputsOfSegment.instance()); 78 querySpecifications.add(TooManyInputsOfSegment.instance());
85 querySpecifications.add(TurnoutConnectedToBothOutputs.instance()); 79 querySpecifications.add(TurnoutConnectedToBothOutputs.instance());
86 querySpecifications.add(ExtraInputOfTurnout.instance());
87 querySpecifications.add(NoExtraInputOfTurnout.instance());
88 querySpecifications.add(TooManyExtraInputsOfTurnout.instance());
89 querySpecifications.add(Adjacent.instance()); 80 querySpecifications.add(Adjacent.instance());
81 querySpecifications.add(TooManyInputsOfTurnout.instance());
82 querySpecifications.add(InputsOfTurnout.instance());
83 querySpecifications.add(TooFewInputsOfTurnout.instance());
90 querySpecifications.add(Reachable.instance()); 84 querySpecifications.add(Reachable.instance());
91 querySpecifications.add(Unreachable.instance()); 85 querySpecifications.add(Unreachable.instance());
92 } 86 }
93 87
94 public TurnoutInSegments getTurnoutInSegments() {
95 return TurnoutInSegments.instance();
96 }
97
98 public TurnoutInSegments.Matcher getTurnoutInSegments(final ViatraQueryEngine engine) {
99 return TurnoutInSegments.Matcher.on(engine);
100 }
101
102 public ConnectedTo getConnectedTo() { 88 public ConnectedTo getConnectedTo() {
103 return ConnectedTo.instance(); 89 return ConnectedTo.instance();
104 } 90 }
@@ -147,14 +133,6 @@ public final class Modes3Queries extends BaseGeneratedPatternGroup {
147 return TurnoutOutputsAreSame.Matcher.on(engine); 133 return TurnoutOutputsAreSame.Matcher.on(engine);
148 } 134 }
149 135
150 public Turnout getTurnout() {
151 return Turnout.instance();
152 }
153
154 public Turnout.Matcher getTurnout(final ViatraQueryEngine engine) {
155 return Turnout.Matcher.on(engine);
156 }
157
158 public Output getOutput() { 136 public Output getOutput() {
159 return Output.instance(); 137 return Output.instance();
160 } 138 }
@@ -179,36 +157,36 @@ public final class Modes3Queries extends BaseGeneratedPatternGroup {
179 return TurnoutConnectedToBothOutputs.Matcher.on(engine); 157 return TurnoutConnectedToBothOutputs.Matcher.on(engine);
180 } 158 }
181 159
182 public ExtraInputOfTurnout getExtraInputOfTurnout() { 160 public Adjacent getAdjacent() {
183 return ExtraInputOfTurnout.instance(); 161 return Adjacent.instance();
184 } 162 }
185 163
186 public ExtraInputOfTurnout.Matcher getExtraInputOfTurnout(final ViatraQueryEngine engine) { 164 public Adjacent.Matcher getAdjacent(final ViatraQueryEngine engine) {
187 return ExtraInputOfTurnout.Matcher.on(engine); 165 return Adjacent.Matcher.on(engine);
188 } 166 }
189 167
190 public NoExtraInputOfTurnout getNoExtraInputOfTurnout() { 168 public TooManyInputsOfTurnout getTooManyInputsOfTurnout() {
191 return NoExtraInputOfTurnout.instance(); 169 return TooManyInputsOfTurnout.instance();
192 } 170 }
193 171
194 public NoExtraInputOfTurnout.Matcher getNoExtraInputOfTurnout(final ViatraQueryEngine engine) { 172 public TooManyInputsOfTurnout.Matcher getTooManyInputsOfTurnout(final ViatraQueryEngine engine) {
195 return NoExtraInputOfTurnout.Matcher.on(engine); 173 return TooManyInputsOfTurnout.Matcher.on(engine);
196 } 174 }
197 175
198 public TooManyExtraInputsOfTurnout getTooManyExtraInputsOfTurnout() { 176 public InputsOfTurnout getInputsOfTurnout() {
199 return TooManyExtraInputsOfTurnout.instance(); 177 return InputsOfTurnout.instance();
200 } 178 }
201 179
202 public TooManyExtraInputsOfTurnout.Matcher getTooManyExtraInputsOfTurnout(final ViatraQueryEngine engine) { 180 public InputsOfTurnout.Matcher getInputsOfTurnout(final ViatraQueryEngine engine) {
203 return TooManyExtraInputsOfTurnout.Matcher.on(engine); 181 return InputsOfTurnout.Matcher.on(engine);
204 } 182 }
205 183
206 public Adjacent getAdjacent() { 184 public TooFewInputsOfTurnout getTooFewInputsOfTurnout() {
207 return Adjacent.instance(); 185 return TooFewInputsOfTurnout.instance();
208 } 186 }
209 187
210 public Adjacent.Matcher getAdjacent(final ViatraQueryEngine engine) { 188 public TooFewInputsOfTurnout.Matcher getTooFewInputsOfTurnout(final ViatraQueryEngine engine) {
211 return Adjacent.Matcher.on(engine); 189 return TooFewInputsOfTurnout.Matcher.on(engine);
212 } 190 }
213 191
214 public Reachable getReachable() { 192 public Reachable getReachable() {
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/NoExtraInputOfTurnout.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooFewInputsOfTurnout.java
index 621d736f..088640ca 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/NoExtraInputOfTurnout.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooFewInputsOfTurnout.java
@@ -14,7 +14,7 @@ import java.util.function.Consumer;
14import java.util.stream.Collectors; 14import java.util.stream.Collectors;
15import java.util.stream.Stream; 15import java.util.stream.Stream;
16import modes3.Turnout; 16import modes3.Turnout;
17import modes3.queries.ExtraInputOfTurnout; 17import modes3.queries.InputsOfTurnout;
18import org.apache.log4j.Logger; 18import org.apache.log4j.Logger;
19import org.eclipse.emf.ecore.EClass; 19import org.eclipse.emf.ecore.EClass;
20import org.eclipse.viatra.query.runtime.api.IPatternMatch; 20import org.eclipse.viatra.query.runtime.api.IPatternMatch;
@@ -45,9 +45,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
45 * 45 *
46 * <p>Original source: 46 * <p>Original source:
47 * <code><pre> 47 * <code><pre>
48 * {@literal @}Constraint(message = "noExtraInputOfTurnout", severity = "error", key = { T }) 48 * {@literal @}Constraint(message = "tooFewInputsOfTurnout", severity = "error", key = { T })
49 * pattern noExtraInputOfTurnout(T : Turnout) { 49 * pattern tooFewInputsOfTurnout(T : Turnout) {
50 * neg find extraInputOfTurnout(T, _); 50 * neg find inputsOfTurnout(T);
51 * } 51 * }
52 * </pre></code> 52 * </pre></code>
53 * 53 *
@@ -56,9 +56,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
56 * 56 *
57 */ 57 */
58@SuppressWarnings("all") 58@SuppressWarnings("all")
59public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecification<NoExtraInputOfTurnout.Matcher> { 59public final class TooFewInputsOfTurnout extends BaseGeneratedEMFQuerySpecification<TooFewInputsOfTurnout.Matcher> {
60 /** 60 /**
61 * Pattern-specific match representation of the modes3.queries.noExtraInputOfTurnout pattern, 61 * Pattern-specific match representation of the modes3.queries.tooFewInputsOfTurnout pattern,
62 * to be used in conjunction with {@link Matcher}. 62 * to be used in conjunction with {@link Matcher}.
63 * 63 *
64 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. 64 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
@@ -115,12 +115,12 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
115 115
116 @Override 116 @Override
117 public String patternName() { 117 public String patternName() {
118 return "modes3.queries.noExtraInputOfTurnout"; 118 return "modes3.queries.tooFewInputsOfTurnout";
119 } 119 }
120 120
121 @Override 121 @Override
122 public List<String> parameterNames() { 122 public List<String> parameterNames() {
123 return NoExtraInputOfTurnout.Match.parameterNames; 123 return TooFewInputsOfTurnout.Match.parameterNames;
124 } 124 }
125 125
126 @Override 126 @Override
@@ -129,7 +129,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
129 } 129 }
130 130
131 @Override 131 @Override
132 public NoExtraInputOfTurnout.Match toImmutable() { 132 public TooFewInputsOfTurnout.Match toImmutable() {
133 return isMutable() ? newMatch(fT) : this; 133 return isMutable() ? newMatch(fT) : this;
134 } 134 }
135 135
@@ -152,8 +152,8 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
152 if (obj == null) { 152 if (obj == null) {
153 return false; 153 return false;
154 } 154 }
155 if ((obj instanceof NoExtraInputOfTurnout.Match)) { 155 if ((obj instanceof TooFewInputsOfTurnout.Match)) {
156 NoExtraInputOfTurnout.Match other = (NoExtraInputOfTurnout.Match) obj; 156 TooFewInputsOfTurnout.Match other = (TooFewInputsOfTurnout.Match) obj;
157 return Objects.equals(fT, other.fT); 157 return Objects.equals(fT, other.fT);
158 } else { 158 } else {
159 // this should be infrequent 159 // this should be infrequent
@@ -166,8 +166,8 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
166 } 166 }
167 167
168 @Override 168 @Override
169 public NoExtraInputOfTurnout specification() { 169 public TooFewInputsOfTurnout specification() {
170 return NoExtraInputOfTurnout.instance(); 170 return TooFewInputsOfTurnout.instance();
171 } 171 }
172 172
173 /** 173 /**
@@ -177,7 +177,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
177 * @return the empty match. 177 * @return the empty match.
178 * 178 *
179 */ 179 */
180 public static NoExtraInputOfTurnout.Match newEmptyMatch() { 180 public static TooFewInputsOfTurnout.Match newEmptyMatch() {
181 return new Mutable(null); 181 return new Mutable(null);
182 } 182 }
183 183
@@ -189,7 +189,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
189 * @return the new, mutable (partial) match object. 189 * @return the new, mutable (partial) match object.
190 * 190 *
191 */ 191 */
192 public static NoExtraInputOfTurnout.Match newMutableMatch(final Turnout pT) { 192 public static TooFewInputsOfTurnout.Match newMutableMatch(final Turnout pT) {
193 return new Mutable(pT); 193 return new Mutable(pT);
194 } 194 }
195 195
@@ -201,11 +201,11 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
201 * @return the (partial) match object. 201 * @return the (partial) match object.
202 * 202 *
203 */ 203 */
204 public static NoExtraInputOfTurnout.Match newMatch(final Turnout pT) { 204 public static TooFewInputsOfTurnout.Match newMatch(final Turnout pT) {
205 return new Immutable(pT); 205 return new Immutable(pT);
206 } 206 }
207 207
208 private static final class Mutable extends NoExtraInputOfTurnout.Match { 208 private static final class Mutable extends TooFewInputsOfTurnout.Match {
209 Mutable(final Turnout pT) { 209 Mutable(final Turnout pT) {
210 super(pT); 210 super(pT);
211 } 211 }
@@ -216,7 +216,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
216 } 216 }
217 } 217 }
218 218
219 private static final class Immutable extends NoExtraInputOfTurnout.Match { 219 private static final class Immutable extends TooFewInputsOfTurnout.Match {
220 Immutable(final Turnout pT) { 220 Immutable(final Turnout pT) {
221 super(pT); 221 super(pT);
222 } 222 }
@@ -229,7 +229,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
229 } 229 }
230 230
231 /** 231 /**
232 * Generated pattern matcher API of the modes3.queries.noExtraInputOfTurnout pattern, 232 * Generated pattern matcher API of the modes3.queries.tooFewInputsOfTurnout pattern,
233 * providing pattern-specific query methods. 233 * providing pattern-specific query methods.
234 * 234 *
235 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, 235 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
@@ -239,17 +239,17 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
239 * 239 *
240 * <p>Original source: 240 * <p>Original source:
241 * <code><pre> 241 * <code><pre>
242 * {@literal @}Constraint(message = "noExtraInputOfTurnout", severity = "error", key = { T }) 242 * {@literal @}Constraint(message = "tooFewInputsOfTurnout", severity = "error", key = { T })
243 * pattern noExtraInputOfTurnout(T : Turnout) { 243 * pattern tooFewInputsOfTurnout(T : Turnout) {
244 * neg find extraInputOfTurnout(T, _); 244 * neg find inputsOfTurnout(T);
245 * } 245 * }
246 * </pre></code> 246 * </pre></code>
247 * 247 *
248 * @see Match 248 * @see Match
249 * @see NoExtraInputOfTurnout 249 * @see TooFewInputsOfTurnout
250 * 250 *
251 */ 251 */
252 public static class Matcher extends BaseMatcher<NoExtraInputOfTurnout.Match> { 252 public static class Matcher extends BaseMatcher<TooFewInputsOfTurnout.Match> {
253 /** 253 /**
254 * Initializes the pattern matcher within an existing VIATRA Query engine. 254 * Initializes the pattern matcher within an existing VIATRA Query engine.
255 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. 255 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
@@ -258,7 +258,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
258 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation 258 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
259 * 259 *
260 */ 260 */
261 public static NoExtraInputOfTurnout.Matcher on(final ViatraQueryEngine engine) { 261 public static TooFewInputsOfTurnout.Matcher on(final ViatraQueryEngine engine) {
262 // check if matcher already exists 262 // check if matcher already exists
263 Matcher matcher = engine.getExistingMatcher(querySpecification()); 263 Matcher matcher = engine.getExistingMatcher(querySpecification());
264 if (matcher == null) { 264 if (matcher == null) {
@@ -273,13 +273,13 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
273 * @noreference This method is for internal matcher initialization by the framework, do not call it manually. 273 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
274 * 274 *
275 */ 275 */
276 public static NoExtraInputOfTurnout.Matcher create() { 276 public static TooFewInputsOfTurnout.Matcher create() {
277 return new Matcher(); 277 return new Matcher();
278 } 278 }
279 279
280 private static final int POSITION_T = 0; 280 private static final int POSITION_T = 0;
281 281
282 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(NoExtraInputOfTurnout.Matcher.class); 282 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TooFewInputsOfTurnout.Matcher.class);
283 283
284 /** 284 /**
285 * Initializes the pattern matcher within an existing VIATRA Query engine. 285 * Initializes the pattern matcher within an existing VIATRA Query engine.
@@ -299,7 +299,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
299 * @return matches represented as a Match object. 299 * @return matches represented as a Match object.
300 * 300 *
301 */ 301 */
302 public Collection<NoExtraInputOfTurnout.Match> getAllMatches(final Turnout pT) { 302 public Collection<TooFewInputsOfTurnout.Match> getAllMatches(final Turnout pT) {
303 return rawStreamAllMatches(new Object[]{pT}).collect(Collectors.toSet()); 303 return rawStreamAllMatches(new Object[]{pT}).collect(Collectors.toSet());
304 } 304 }
305 305
@@ -313,7 +313,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
313 * @return a stream of matches represented as a Match object. 313 * @return a stream of matches represented as a Match object.
314 * 314 *
315 */ 315 */
316 public Stream<NoExtraInputOfTurnout.Match> streamAllMatches(final Turnout pT) { 316 public Stream<TooFewInputsOfTurnout.Match> streamAllMatches(final Turnout pT) {
317 return rawStreamAllMatches(new Object[]{pT}); 317 return rawStreamAllMatches(new Object[]{pT});
318 } 318 }
319 319
@@ -324,7 +324,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
324 * @return a match represented as a Match object, or null if no match is found. 324 * @return a match represented as a Match object, or null if no match is found.
325 * 325 *
326 */ 326 */
327 public Optional<NoExtraInputOfTurnout.Match> getOneArbitraryMatch(final Turnout pT) { 327 public Optional<TooFewInputsOfTurnout.Match> getOneArbitraryMatch(final Turnout pT) {
328 return rawGetOneArbitraryMatch(new Object[]{pT}); 328 return rawGetOneArbitraryMatch(new Object[]{pT});
329 } 329 }
330 330
@@ -357,7 +357,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
357 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 357 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
358 * 358 *
359 */ 359 */
360 public boolean forOneArbitraryMatch(final Turnout pT, final Consumer<? super NoExtraInputOfTurnout.Match> processor) { 360 public boolean forOneArbitraryMatch(final Turnout pT, final Consumer<? super TooFewInputsOfTurnout.Match> processor) {
361 return rawForOneArbitraryMatch(new Object[]{pT}, processor); 361 return rawForOneArbitraryMatch(new Object[]{pT}, processor);
362 } 362 }
363 363
@@ -369,8 +369,8 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
369 * @return the (partial) match object. 369 * @return the (partial) match object.
370 * 370 *
371 */ 371 */
372 public NoExtraInputOfTurnout.Match newMatch(final Turnout pT) { 372 public TooFewInputsOfTurnout.Match newMatch(final Turnout pT) {
373 return NoExtraInputOfTurnout.Match.newMatch(pT); 373 return TooFewInputsOfTurnout.Match.newMatch(pT);
374 } 374 }
375 375
376 /** 376 /**
@@ -401,9 +401,9 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
401 } 401 }
402 402
403 @Override 403 @Override
404 protected NoExtraInputOfTurnout.Match tupleToMatch(final Tuple t) { 404 protected TooFewInputsOfTurnout.Match tupleToMatch(final Tuple t) {
405 try { 405 try {
406 return NoExtraInputOfTurnout.Match.newMatch((Turnout) t.get(POSITION_T)); 406 return TooFewInputsOfTurnout.Match.newMatch((Turnout) t.get(POSITION_T));
407 } catch(ClassCastException e) { 407 } catch(ClassCastException e) {
408 LOGGER.error("Element(s) in tuple not properly typed!",e); 408 LOGGER.error("Element(s) in tuple not properly typed!",e);
409 return null; 409 return null;
@@ -411,9 +411,9 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
411 } 411 }
412 412
413 @Override 413 @Override
414 protected NoExtraInputOfTurnout.Match arrayToMatch(final Object[] match) { 414 protected TooFewInputsOfTurnout.Match arrayToMatch(final Object[] match) {
415 try { 415 try {
416 return NoExtraInputOfTurnout.Match.newMatch((Turnout) match[POSITION_T]); 416 return TooFewInputsOfTurnout.Match.newMatch((Turnout) match[POSITION_T]);
417 } catch(ClassCastException e) { 417 } catch(ClassCastException e) {
418 LOGGER.error("Element(s) in array not properly typed!",e); 418 LOGGER.error("Element(s) in array not properly typed!",e);
419 return null; 419 return null;
@@ -421,9 +421,9 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
421 } 421 }
422 422
423 @Override 423 @Override
424 protected NoExtraInputOfTurnout.Match arrayToMatchMutable(final Object[] match) { 424 protected TooFewInputsOfTurnout.Match arrayToMatchMutable(final Object[] match) {
425 try { 425 try {
426 return NoExtraInputOfTurnout.Match.newMutableMatch((Turnout) match[POSITION_T]); 426 return TooFewInputsOfTurnout.Match.newMutableMatch((Turnout) match[POSITION_T]);
427 } catch(ClassCastException e) { 427 } catch(ClassCastException e) {
428 LOGGER.error("Element(s) in array not properly typed!",e); 428 LOGGER.error("Element(s) in array not properly typed!",e);
429 return null; 429 return null;
@@ -435,12 +435,12 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
435 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 435 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
436 * 436 *
437 */ 437 */
438 public static IQuerySpecification<NoExtraInputOfTurnout.Matcher> querySpecification() { 438 public static IQuerySpecification<TooFewInputsOfTurnout.Matcher> querySpecification() {
439 return NoExtraInputOfTurnout.instance(); 439 return TooFewInputsOfTurnout.instance();
440 } 440 }
441 } 441 }
442 442
443 private NoExtraInputOfTurnout() { 443 private TooFewInputsOfTurnout() {
444 super(GeneratedPQuery.INSTANCE); 444 super(GeneratedPQuery.INSTANCE);
445 } 445 }
446 446
@@ -449,7 +449,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
449 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 449 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
450 * 450 *
451 */ 451 */
452 public static NoExtraInputOfTurnout instance() { 452 public static TooFewInputsOfTurnout instance() {
453 try{ 453 try{
454 return LazyHolder.INSTANCE; 454 return LazyHolder.INSTANCE;
455 } catch (ExceptionInInitializerError err) { 455 } catch (ExceptionInInitializerError err) {
@@ -458,35 +458,35 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
458 } 458 }
459 459
460 @Override 460 @Override
461 protected NoExtraInputOfTurnout.Matcher instantiate(final ViatraQueryEngine engine) { 461 protected TooFewInputsOfTurnout.Matcher instantiate(final ViatraQueryEngine engine) {
462 return NoExtraInputOfTurnout.Matcher.on(engine); 462 return TooFewInputsOfTurnout.Matcher.on(engine);
463 } 463 }
464 464
465 @Override 465 @Override
466 public NoExtraInputOfTurnout.Matcher instantiate() { 466 public TooFewInputsOfTurnout.Matcher instantiate() {
467 return NoExtraInputOfTurnout.Matcher.create(); 467 return TooFewInputsOfTurnout.Matcher.create();
468 } 468 }
469 469
470 @Override 470 @Override
471 public NoExtraInputOfTurnout.Match newEmptyMatch() { 471 public TooFewInputsOfTurnout.Match newEmptyMatch() {
472 return NoExtraInputOfTurnout.Match.newEmptyMatch(); 472 return TooFewInputsOfTurnout.Match.newEmptyMatch();
473 } 473 }
474 474
475 @Override 475 @Override
476 public NoExtraInputOfTurnout.Match newMatch(final Object... parameters) { 476 public TooFewInputsOfTurnout.Match newMatch(final Object... parameters) {
477 return NoExtraInputOfTurnout.Match.newMatch((modes3.Turnout) parameters[0]); 477 return TooFewInputsOfTurnout.Match.newMatch((modes3.Turnout) parameters[0]);
478 } 478 }
479 479
480 /** 480 /**
481 * Inner class allowing the singleton instance of {@link NoExtraInputOfTurnout} to be created 481 * Inner class allowing the singleton instance of {@link TooFewInputsOfTurnout} to be created
482 * <b>not</b> at the class load time of the outer class, 482 * <b>not</b> at the class load time of the outer class,
483 * but rather at the first call to {@link NoExtraInputOfTurnout#instance()}. 483 * but rather at the first call to {@link TooFewInputsOfTurnout#instance()}.
484 * 484 *
485 * <p> This workaround is required e.g. to support recursion. 485 * <p> This workaround is required e.g. to support recursion.
486 * 486 *
487 */ 487 */
488 private static class LazyHolder { 488 private static class LazyHolder {
489 private static final NoExtraInputOfTurnout INSTANCE = new NoExtraInputOfTurnout(); 489 private static final TooFewInputsOfTurnout INSTANCE = new TooFewInputsOfTurnout();
490 490
491 /** 491 /**
492 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. 492 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
@@ -504,7 +504,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
504 } 504 }
505 505
506 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 506 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
507 private static final NoExtraInputOfTurnout.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 507 private static final TooFewInputsOfTurnout.GeneratedPQuery INSTANCE = new GeneratedPQuery();
508 508
509 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT); 509 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT);
510 510
@@ -516,7 +516,7 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
516 516
517 @Override 517 @Override
518 public String getFullyQualifiedName() { 518 public String getFullyQualifiedName() {
519 return "modes3.queries.noExtraInputOfTurnout"; 519 return "modes3.queries.tooFewInputsOfTurnout";
520 } 520 }
521 521
522 @Override 522 @Override
@@ -536,18 +536,17 @@ public final class NoExtraInputOfTurnout extends BaseGeneratedEMFQuerySpecificat
536 { 536 {
537 PBody body = new PBody(this); 537 PBody body = new PBody(this);
538 PVariable var_T = body.getOrCreateVariableByName("T"); 538 PVariable var_T = body.getOrCreateVariableByName("T");
539 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
540 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout"))); 539 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
541 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 540 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
542 new ExportedParameter(body, var_T, parameter_T) 541 new ExportedParameter(body, var_T, parameter_T)
543 )); 542 ));
544 // neg find extraInputOfTurnout(T, _) 543 // neg find inputsOfTurnout(T)
545 new NegativePatternCall(body, Tuples.flatTupleOf(var_T, var___0_), ExtraInputOfTurnout.instance().getInternalQueryRepresentation()); 544 new NegativePatternCall(body, Tuples.flatTupleOf(var_T), InputsOfTurnout.instance().getInternalQueryRepresentation());
546 bodies.add(body); 545 bodies.add(body);
547 } 546 }
548 { 547 {
549 PAnnotation annotation = new PAnnotation("Constraint"); 548 PAnnotation annotation = new PAnnotation("Constraint");
550 annotation.addAttribute("message", "noExtraInputOfTurnout"); 549 annotation.addAttribute("message", "tooFewInputsOfTurnout");
551 annotation.addAttribute("severity", "error"); 550 annotation.addAttribute("severity", "error");
552 annotation.addAttribute("key", Arrays.asList(new Object[] { 551 annotation.addAttribute("key", Arrays.asList(new Object[] {
553 new ParameterReference("T") 552 new ParameterReference("T")
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java
index e5e8827c..ff82dda1 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java
@@ -13,9 +13,8 @@ import java.util.Set;
13import java.util.function.Consumer; 13import java.util.function.Consumer;
14import java.util.stream.Collectors; 14import java.util.stream.Collectors;
15import java.util.stream.Stream; 15import java.util.stream.Stream;
16import modes3.Segment; 16import modes3.SimpleSegment;
17import modes3.queries.Output; 17import modes3.queries.Output;
18import modes3.queries.Turnout;
19import org.apache.log4j.Logger; 18import org.apache.log4j.Logger;
20import org.eclipse.emf.ecore.EClass; 19import org.eclipse.emf.ecore.EClass;
21import org.eclipse.viatra.query.runtime.api.IPatternMatch; 20import org.eclipse.viatra.query.runtime.api.IPatternMatch;
@@ -33,7 +32,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation
33import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference; 32import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; 33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality; 34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
37import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; 35import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
38import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 36import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
39import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
@@ -55,8 +53,7 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
55 * //} 53 * //}
56 * 54 *
57 * {@literal @}Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S }) 55 * {@literal @}Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S })
58 * pattern tooManyInputsOfSegment(S : Segment) { 56 * pattern tooManyInputsOfSegment(S : SimpleSegment) {
59 * neg find turnout(S);
60 * find output(I1, S); 57 * find output(I1, S);
61 * find output(I2, S); 58 * find output(I2, S);
62 * find output(I3, S); 59 * find output(I3, S);
@@ -85,11 +82,11 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
85 * 82 *
86 */ 83 */
87 public static abstract class Match extends BasePatternMatch { 84 public static abstract class Match extends BasePatternMatch {
88 private Segment fS; 85 private SimpleSegment fS;
89 86
90 private static List<String> parameterNames = makeImmutableList("S"); 87 private static List<String> parameterNames = makeImmutableList("S");
91 88
92 private Match(final Segment pS) { 89 private Match(final SimpleSegment pS) {
93 this.fS = pS; 90 this.fS = pS;
94 } 91 }
95 92
@@ -109,7 +106,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
109 } 106 }
110 } 107 }
111 108
112 public Segment getS() { 109 public SimpleSegment getS() {
113 return this.fS; 110 return this.fS;
114 } 111 }
115 112
@@ -117,13 +114,13 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
117 public boolean set(final String parameterName, final Object newValue) { 114 public boolean set(final String parameterName, final Object newValue) {
118 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 115 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
119 if ("S".equals(parameterName) ) { 116 if ("S".equals(parameterName) ) {
120 this.fS = (Segment) newValue; 117 this.fS = (SimpleSegment) newValue;
121 return true; 118 return true;
122 } 119 }
123 return false; 120 return false;
124 } 121 }
125 122
126 public void setS(final Segment pS) { 123 public void setS(final SimpleSegment pS) {
127 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 124 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
128 this.fS = pS; 125 this.fS = pS;
129 } 126 }
@@ -204,7 +201,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
204 * @return the new, mutable (partial) match object. 201 * @return the new, mutable (partial) match object.
205 * 202 *
206 */ 203 */
207 public static TooManyInputsOfSegment.Match newMutableMatch(final Segment pS) { 204 public static TooManyInputsOfSegment.Match newMutableMatch(final SimpleSegment pS) {
208 return new Mutable(pS); 205 return new Mutable(pS);
209 } 206 }
210 207
@@ -216,12 +213,12 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
216 * @return the (partial) match object. 213 * @return the (partial) match object.
217 * 214 *
218 */ 215 */
219 public static TooManyInputsOfSegment.Match newMatch(final Segment pS) { 216 public static TooManyInputsOfSegment.Match newMatch(final SimpleSegment pS) {
220 return new Immutable(pS); 217 return new Immutable(pS);
221 } 218 }
222 219
223 private static final class Mutable extends TooManyInputsOfSegment.Match { 220 private static final class Mutable extends TooManyInputsOfSegment.Match {
224 Mutable(final Segment pS) { 221 Mutable(final SimpleSegment pS) {
225 super(pS); 222 super(pS);
226 } 223 }
227 224
@@ -232,7 +229,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
232 } 229 }
233 230
234 private static final class Immutable extends TooManyInputsOfSegment.Match { 231 private static final class Immutable extends TooManyInputsOfSegment.Match {
235 Immutable(final Segment pS) { 232 Immutable(final SimpleSegment pS) {
236 super(pS); 233 super(pS);
237 } 234 }
238 235
@@ -261,8 +258,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
261 * //} 258 * //}
262 * 259 *
263 * {@literal @}Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S }) 260 * {@literal @}Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S })
264 * pattern tooManyInputsOfSegment(S : Segment) { 261 * pattern tooManyInputsOfSegment(S : SimpleSegment) {
265 * neg find turnout(S);
266 * find output(I1, S); 262 * find output(I1, S);
267 * find output(I2, S); 263 * find output(I2, S);
268 * find output(I3, S); 264 * find output(I3, S);
@@ -326,7 +322,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
326 * @return matches represented as a Match object. 322 * @return matches represented as a Match object.
327 * 323 *
328 */ 324 */
329 public Collection<TooManyInputsOfSegment.Match> getAllMatches(final Segment pS) { 325 public Collection<TooManyInputsOfSegment.Match> getAllMatches(final SimpleSegment pS) {
330 return rawStreamAllMatches(new Object[]{pS}).collect(Collectors.toSet()); 326 return rawStreamAllMatches(new Object[]{pS}).collect(Collectors.toSet());
331 } 327 }
332 328
@@ -340,7 +336,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
340 * @return a stream of matches represented as a Match object. 336 * @return a stream of matches represented as a Match object.
341 * 337 *
342 */ 338 */
343 public Stream<TooManyInputsOfSegment.Match> streamAllMatches(final Segment pS) { 339 public Stream<TooManyInputsOfSegment.Match> streamAllMatches(final SimpleSegment pS) {
344 return rawStreamAllMatches(new Object[]{pS}); 340 return rawStreamAllMatches(new Object[]{pS});
345 } 341 }
346 342
@@ -351,7 +347,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
351 * @return a match represented as a Match object, or null if no match is found. 347 * @return a match represented as a Match object, or null if no match is found.
352 * 348 *
353 */ 349 */
354 public Optional<TooManyInputsOfSegment.Match> getOneArbitraryMatch(final Segment pS) { 350 public Optional<TooManyInputsOfSegment.Match> getOneArbitraryMatch(final SimpleSegment pS) {
355 return rawGetOneArbitraryMatch(new Object[]{pS}); 351 return rawGetOneArbitraryMatch(new Object[]{pS});
356 } 352 }
357 353
@@ -362,7 +358,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
362 * @return true if the input is a valid (partial) match of the pattern. 358 * @return true if the input is a valid (partial) match of the pattern.
363 * 359 *
364 */ 360 */
365 public boolean hasMatch(final Segment pS) { 361 public boolean hasMatch(final SimpleSegment pS) {
366 return rawHasMatch(new Object[]{pS}); 362 return rawHasMatch(new Object[]{pS});
367 } 363 }
368 364
@@ -372,7 +368,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
372 * @return the number of pattern matches found. 368 * @return the number of pattern matches found.
373 * 369 *
374 */ 370 */
375 public int countMatches(final Segment pS) { 371 public int countMatches(final SimpleSegment pS) {
376 return rawCountMatches(new Object[]{pS}); 372 return rawCountMatches(new Object[]{pS});
377 } 373 }
378 374
@@ -384,7 +380,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
384 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 380 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
385 * 381 *
386 */ 382 */
387 public boolean forOneArbitraryMatch(final Segment pS, final Consumer<? super TooManyInputsOfSegment.Match> processor) { 383 public boolean forOneArbitraryMatch(final SimpleSegment pS, final Consumer<? super TooManyInputsOfSegment.Match> processor) {
388 return rawForOneArbitraryMatch(new Object[]{pS}, processor); 384 return rawForOneArbitraryMatch(new Object[]{pS}, processor);
389 } 385 }
390 386
@@ -396,7 +392,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
396 * @return the (partial) match object. 392 * @return the (partial) match object.
397 * 393 *
398 */ 394 */
399 public TooManyInputsOfSegment.Match newMatch(final Segment pS) { 395 public TooManyInputsOfSegment.Match newMatch(final SimpleSegment pS) {
400 return TooManyInputsOfSegment.Match.newMatch(pS); 396 return TooManyInputsOfSegment.Match.newMatch(pS);
401 } 397 }
402 398
@@ -405,8 +401,8 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
405 * @return the Set of all values or empty set if there are no matches 401 * @return the Set of all values or empty set if there are no matches
406 * 402 *
407 */ 403 */
408 protected Stream<Segment> rawStreamAllValuesOfS(final Object[] parameters) { 404 protected Stream<SimpleSegment> rawStreamAllValuesOfS(final Object[] parameters) {
409 return rawStreamAllValues(POSITION_S, parameters).map(Segment.class::cast); 405 return rawStreamAllValues(POSITION_S, parameters).map(SimpleSegment.class::cast);
410 } 406 }
411 407
412 /** 408 /**
@@ -414,7 +410,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
414 * @return the Set of all values or empty set if there are no matches 410 * @return the Set of all values or empty set if there are no matches
415 * 411 *
416 */ 412 */
417 public Set<Segment> getAllValuesOfS() { 413 public Set<SimpleSegment> getAllValuesOfS() {
418 return rawStreamAllValuesOfS(emptyArray()).collect(Collectors.toSet()); 414 return rawStreamAllValuesOfS(emptyArray()).collect(Collectors.toSet());
419 } 415 }
420 416
@@ -423,14 +419,14 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
423 * @return the Set of all values or empty set if there are no matches 419 * @return the Set of all values or empty set if there are no matches
424 * 420 *
425 */ 421 */
426 public Stream<Segment> streamAllValuesOfS() { 422 public Stream<SimpleSegment> streamAllValuesOfS() {
427 return rawStreamAllValuesOfS(emptyArray()); 423 return rawStreamAllValuesOfS(emptyArray());
428 } 424 }
429 425
430 @Override 426 @Override
431 protected TooManyInputsOfSegment.Match tupleToMatch(final Tuple t) { 427 protected TooManyInputsOfSegment.Match tupleToMatch(final Tuple t) {
432 try { 428 try {
433 return TooManyInputsOfSegment.Match.newMatch((Segment) t.get(POSITION_S)); 429 return TooManyInputsOfSegment.Match.newMatch((SimpleSegment) t.get(POSITION_S));
434 } catch(ClassCastException e) { 430 } catch(ClassCastException e) {
435 LOGGER.error("Element(s) in tuple not properly typed!",e); 431 LOGGER.error("Element(s) in tuple not properly typed!",e);
436 return null; 432 return null;
@@ -440,7 +436,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
440 @Override 436 @Override
441 protected TooManyInputsOfSegment.Match arrayToMatch(final Object[] match) { 437 protected TooManyInputsOfSegment.Match arrayToMatch(final Object[] match) {
442 try { 438 try {
443 return TooManyInputsOfSegment.Match.newMatch((Segment) match[POSITION_S]); 439 return TooManyInputsOfSegment.Match.newMatch((SimpleSegment) match[POSITION_S]);
444 } catch(ClassCastException e) { 440 } catch(ClassCastException e) {
445 LOGGER.error("Element(s) in array not properly typed!",e); 441 LOGGER.error("Element(s) in array not properly typed!",e);
446 return null; 442 return null;
@@ -450,7 +446,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
450 @Override 446 @Override
451 protected TooManyInputsOfSegment.Match arrayToMatchMutable(final Object[] match) { 447 protected TooManyInputsOfSegment.Match arrayToMatchMutable(final Object[] match) {
452 try { 448 try {
453 return TooManyInputsOfSegment.Match.newMutableMatch((Segment) match[POSITION_S]); 449 return TooManyInputsOfSegment.Match.newMutableMatch((SimpleSegment) match[POSITION_S]);
454 } catch(ClassCastException e) { 450 } catch(ClassCastException e) {
455 LOGGER.error("Element(s) in array not properly typed!",e); 451 LOGGER.error("Element(s) in array not properly typed!",e);
456 return null; 452 return null;
@@ -501,7 +497,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
501 497
502 @Override 498 @Override
503 public TooManyInputsOfSegment.Match newMatch(final Object... parameters) { 499 public TooManyInputsOfSegment.Match newMatch(final Object... parameters) {
504 return TooManyInputsOfSegment.Match.newMatch((modes3.Segment) parameters[0]); 500 return TooManyInputsOfSegment.Match.newMatch((modes3.SimpleSegment) parameters[0]);
505 } 501 }
506 502
507 /** 503 /**
@@ -533,7 +529,7 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
533 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 529 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
534 private static final TooManyInputsOfSegment.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 530 private static final TooManyInputsOfSegment.GeneratedPQuery INSTANCE = new GeneratedPQuery();
535 531
536 private final PParameter parameter_S = new PParameter("S", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); 532 private final PParameter parameter_S = new PParameter("S", "modes3.SimpleSegment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "SimpleSegment")), PParameterDirection.INOUT);
537 533
538 private final List<PParameter> parameters = Arrays.asList(parameter_S); 534 private final List<PParameter> parameters = Arrays.asList(parameter_S);
539 535
@@ -566,12 +562,10 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
566 PVariable var_I1 = body.getOrCreateVariableByName("I1"); 562 PVariable var_I1 = body.getOrCreateVariableByName("I1");
567 PVariable var_I2 = body.getOrCreateVariableByName("I2"); 563 PVariable var_I2 = body.getOrCreateVariableByName("I2");
568 PVariable var_I3 = body.getOrCreateVariableByName("I3"); 564 PVariable var_I3 = body.getOrCreateVariableByName("I3");
569 new TypeConstraint(body, Tuples.flatTupleOf(var_S), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); 565 new TypeConstraint(body, Tuples.flatTupleOf(var_S), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "SimpleSegment")));
570 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 566 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
571 new ExportedParameter(body, var_S, parameter_S) 567 new ExportedParameter(body, var_S, parameter_S)
572 )); 568 ));
573 // neg find turnout(S)
574 new NegativePatternCall(body, Tuples.flatTupleOf(var_S), Turnout.instance().getInternalQueryRepresentation());
575 // find output(I1, S) 569 // find output(I1, S)
576 new PositivePatternCall(body, Tuples.flatTupleOf(var_I1, var_S), Output.instance().getInternalQueryRepresentation()); 570 new PositivePatternCall(body, Tuples.flatTupleOf(var_I1, var_S), Output.instance().getInternalQueryRepresentation());
577 // find output(I2, S) 571 // find output(I2, S)
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyExtraInputsOfTurnout.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfTurnout.java
index 9f417795..93076cbb 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyExtraInputsOfTurnout.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfTurnout.java
@@ -14,7 +14,7 @@ import java.util.function.Consumer;
14import java.util.stream.Collectors; 14import java.util.stream.Collectors;
15import java.util.stream.Stream; 15import java.util.stream.Stream;
16import modes3.Turnout; 16import modes3.Turnout;
17import modes3.queries.ExtraInputOfTurnout; 17import modes3.queries.Adjacent;
18import org.apache.log4j.Logger; 18import org.apache.log4j.Logger;
19import org.eclipse.emf.ecore.EClass; 19import org.eclipse.emf.ecore.EClass;
20import org.eclipse.viatra.query.runtime.api.IPatternMatch; 20import org.eclipse.viatra.query.runtime.api.IPatternMatch;
@@ -46,11 +46,18 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
46 * 46 *
47 * <p>Original source: 47 * <p>Original source:
48 * <code><pre> 48 * <code><pre>
49 * {@literal @}Constraint(message = "tooManyExtraInputsOfTurnout", severity = "error", key = { T }) 49 * {@literal @}Constraint(message = "turnoutConnectedToBothOutputs", severity = "error", key = { T })
50 * pattern tooManyExtraInputsOfTurnout(T : Turnout) { 50 * pattern tooManyInputsOfTurnout(T : Turnout) {
51 * find extraInputOfTurnout(T, I1); 51 * find adjacent(I1, T);
52 * find extraInputOfTurnout(T, I2); 52 * find adjacent(I2, T);
53 * find adjacent(I3, T);
54 * find adjacent(I4, T);
53 * I1 != I2; 55 * I1 != I2;
56 * I1 != I3;
57 * I1 != I4;
58 * I2 != I3;
59 * I2 != I4;
60 * I3 != I4;
54 * } 61 * }
55 * </pre></code> 62 * </pre></code>
56 * 63 *
@@ -59,9 +66,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
59 * 66 *
60 */ 67 */
61@SuppressWarnings("all") 68@SuppressWarnings("all")
62public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpecification<TooManyExtraInputsOfTurnout.Matcher> { 69public final class TooManyInputsOfTurnout extends BaseGeneratedEMFQuerySpecification<TooManyInputsOfTurnout.Matcher> {
63 /** 70 /**
64 * Pattern-specific match representation of the modes3.queries.tooManyExtraInputsOfTurnout pattern, 71 * Pattern-specific match representation of the modes3.queries.tooManyInputsOfTurnout pattern,
65 * to be used in conjunction with {@link Matcher}. 72 * to be used in conjunction with {@link Matcher}.
66 * 73 *
67 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. 74 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
@@ -118,12 +125,12 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
118 125
119 @Override 126 @Override
120 public String patternName() { 127 public String patternName() {
121 return "modes3.queries.tooManyExtraInputsOfTurnout"; 128 return "modes3.queries.tooManyInputsOfTurnout";
122 } 129 }
123 130
124 @Override 131 @Override
125 public List<String> parameterNames() { 132 public List<String> parameterNames() {
126 return TooManyExtraInputsOfTurnout.Match.parameterNames; 133 return TooManyInputsOfTurnout.Match.parameterNames;
127 } 134 }
128 135
129 @Override 136 @Override
@@ -132,7 +139,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
132 } 139 }
133 140
134 @Override 141 @Override
135 public TooManyExtraInputsOfTurnout.Match toImmutable() { 142 public TooManyInputsOfTurnout.Match toImmutable() {
136 return isMutable() ? newMatch(fT) : this; 143 return isMutable() ? newMatch(fT) : this;
137 } 144 }
138 145
@@ -155,8 +162,8 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
155 if (obj == null) { 162 if (obj == null) {
156 return false; 163 return false;
157 } 164 }
158 if ((obj instanceof TooManyExtraInputsOfTurnout.Match)) { 165 if ((obj instanceof TooManyInputsOfTurnout.Match)) {
159 TooManyExtraInputsOfTurnout.Match other = (TooManyExtraInputsOfTurnout.Match) obj; 166 TooManyInputsOfTurnout.Match other = (TooManyInputsOfTurnout.Match) obj;
160 return Objects.equals(fT, other.fT); 167 return Objects.equals(fT, other.fT);
161 } else { 168 } else {
162 // this should be infrequent 169 // this should be infrequent
@@ -169,8 +176,8 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
169 } 176 }
170 177
171 @Override 178 @Override
172 public TooManyExtraInputsOfTurnout specification() { 179 public TooManyInputsOfTurnout specification() {
173 return TooManyExtraInputsOfTurnout.instance(); 180 return TooManyInputsOfTurnout.instance();
174 } 181 }
175 182
176 /** 183 /**
@@ -180,7 +187,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
180 * @return the empty match. 187 * @return the empty match.
181 * 188 *
182 */ 189 */
183 public static TooManyExtraInputsOfTurnout.Match newEmptyMatch() { 190 public static TooManyInputsOfTurnout.Match newEmptyMatch() {
184 return new Mutable(null); 191 return new Mutable(null);
185 } 192 }
186 193
@@ -192,7 +199,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
192 * @return the new, mutable (partial) match object. 199 * @return the new, mutable (partial) match object.
193 * 200 *
194 */ 201 */
195 public static TooManyExtraInputsOfTurnout.Match newMutableMatch(final Turnout pT) { 202 public static TooManyInputsOfTurnout.Match newMutableMatch(final Turnout pT) {
196 return new Mutable(pT); 203 return new Mutable(pT);
197 } 204 }
198 205
@@ -204,11 +211,11 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
204 * @return the (partial) match object. 211 * @return the (partial) match object.
205 * 212 *
206 */ 213 */
207 public static TooManyExtraInputsOfTurnout.Match newMatch(final Turnout pT) { 214 public static TooManyInputsOfTurnout.Match newMatch(final Turnout pT) {
208 return new Immutable(pT); 215 return new Immutable(pT);
209 } 216 }
210 217
211 private static final class Mutable extends TooManyExtraInputsOfTurnout.Match { 218 private static final class Mutable extends TooManyInputsOfTurnout.Match {
212 Mutable(final Turnout pT) { 219 Mutable(final Turnout pT) {
213 super(pT); 220 super(pT);
214 } 221 }
@@ -219,7 +226,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
219 } 226 }
220 } 227 }
221 228
222 private static final class Immutable extends TooManyExtraInputsOfTurnout.Match { 229 private static final class Immutable extends TooManyInputsOfTurnout.Match {
223 Immutable(final Turnout pT) { 230 Immutable(final Turnout pT) {
224 super(pT); 231 super(pT);
225 } 232 }
@@ -232,7 +239,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
232 } 239 }
233 240
234 /** 241 /**
235 * Generated pattern matcher API of the modes3.queries.tooManyExtraInputsOfTurnout pattern, 242 * Generated pattern matcher API of the modes3.queries.tooManyInputsOfTurnout pattern,
236 * providing pattern-specific query methods. 243 * providing pattern-specific query methods.
237 * 244 *
238 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, 245 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
@@ -242,19 +249,26 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
242 * 249 *
243 * <p>Original source: 250 * <p>Original source:
244 * <code><pre> 251 * <code><pre>
245 * {@literal @}Constraint(message = "tooManyExtraInputsOfTurnout", severity = "error", key = { T }) 252 * {@literal @}Constraint(message = "turnoutConnectedToBothOutputs", severity = "error", key = { T })
246 * pattern tooManyExtraInputsOfTurnout(T : Turnout) { 253 * pattern tooManyInputsOfTurnout(T : Turnout) {
247 * find extraInputOfTurnout(T, I1); 254 * find adjacent(I1, T);
248 * find extraInputOfTurnout(T, I2); 255 * find adjacent(I2, T);
256 * find adjacent(I3, T);
257 * find adjacent(I4, T);
249 * I1 != I2; 258 * I1 != I2;
259 * I1 != I3;
260 * I1 != I4;
261 * I2 != I3;
262 * I2 != I4;
263 * I3 != I4;
250 * } 264 * }
251 * </pre></code> 265 * </pre></code>
252 * 266 *
253 * @see Match 267 * @see Match
254 * @see TooManyExtraInputsOfTurnout 268 * @see TooManyInputsOfTurnout
255 * 269 *
256 */ 270 */
257 public static class Matcher extends BaseMatcher<TooManyExtraInputsOfTurnout.Match> { 271 public static class Matcher extends BaseMatcher<TooManyInputsOfTurnout.Match> {
258 /** 272 /**
259 * Initializes the pattern matcher within an existing VIATRA Query engine. 273 * Initializes the pattern matcher within an existing VIATRA Query engine.
260 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. 274 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
@@ -263,7 +277,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
263 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation 277 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
264 * 278 *
265 */ 279 */
266 public static TooManyExtraInputsOfTurnout.Matcher on(final ViatraQueryEngine engine) { 280 public static TooManyInputsOfTurnout.Matcher on(final ViatraQueryEngine engine) {
267 // check if matcher already exists 281 // check if matcher already exists
268 Matcher matcher = engine.getExistingMatcher(querySpecification()); 282 Matcher matcher = engine.getExistingMatcher(querySpecification());
269 if (matcher == null) { 283 if (matcher == null) {
@@ -278,13 +292,13 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
278 * @noreference This method is for internal matcher initialization by the framework, do not call it manually. 292 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
279 * 293 *
280 */ 294 */
281 public static TooManyExtraInputsOfTurnout.Matcher create() { 295 public static TooManyInputsOfTurnout.Matcher create() {
282 return new Matcher(); 296 return new Matcher();
283 } 297 }
284 298
285 private static final int POSITION_T = 0; 299 private static final int POSITION_T = 0;
286 300
287 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TooManyExtraInputsOfTurnout.Matcher.class); 301 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TooManyInputsOfTurnout.Matcher.class);
288 302
289 /** 303 /**
290 * Initializes the pattern matcher within an existing VIATRA Query engine. 304 * Initializes the pattern matcher within an existing VIATRA Query engine.
@@ -304,7 +318,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
304 * @return matches represented as a Match object. 318 * @return matches represented as a Match object.
305 * 319 *
306 */ 320 */
307 public Collection<TooManyExtraInputsOfTurnout.Match> getAllMatches(final Turnout pT) { 321 public Collection<TooManyInputsOfTurnout.Match> getAllMatches(final Turnout pT) {
308 return rawStreamAllMatches(new Object[]{pT}).collect(Collectors.toSet()); 322 return rawStreamAllMatches(new Object[]{pT}).collect(Collectors.toSet());
309 } 323 }
310 324
@@ -318,7 +332,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
318 * @return a stream of matches represented as a Match object. 332 * @return a stream of matches represented as a Match object.
319 * 333 *
320 */ 334 */
321 public Stream<TooManyExtraInputsOfTurnout.Match> streamAllMatches(final Turnout pT) { 335 public Stream<TooManyInputsOfTurnout.Match> streamAllMatches(final Turnout pT) {
322 return rawStreamAllMatches(new Object[]{pT}); 336 return rawStreamAllMatches(new Object[]{pT});
323 } 337 }
324 338
@@ -329,7 +343,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
329 * @return a match represented as a Match object, or null if no match is found. 343 * @return a match represented as a Match object, or null if no match is found.
330 * 344 *
331 */ 345 */
332 public Optional<TooManyExtraInputsOfTurnout.Match> getOneArbitraryMatch(final Turnout pT) { 346 public Optional<TooManyInputsOfTurnout.Match> getOneArbitraryMatch(final Turnout pT) {
333 return rawGetOneArbitraryMatch(new Object[]{pT}); 347 return rawGetOneArbitraryMatch(new Object[]{pT});
334 } 348 }
335 349
@@ -362,7 +376,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
362 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 376 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
363 * 377 *
364 */ 378 */
365 public boolean forOneArbitraryMatch(final Turnout pT, final Consumer<? super TooManyExtraInputsOfTurnout.Match> processor) { 379 public boolean forOneArbitraryMatch(final Turnout pT, final Consumer<? super TooManyInputsOfTurnout.Match> processor) {
366 return rawForOneArbitraryMatch(new Object[]{pT}, processor); 380 return rawForOneArbitraryMatch(new Object[]{pT}, processor);
367 } 381 }
368 382
@@ -374,8 +388,8 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
374 * @return the (partial) match object. 388 * @return the (partial) match object.
375 * 389 *
376 */ 390 */
377 public TooManyExtraInputsOfTurnout.Match newMatch(final Turnout pT) { 391 public TooManyInputsOfTurnout.Match newMatch(final Turnout pT) {
378 return TooManyExtraInputsOfTurnout.Match.newMatch(pT); 392 return TooManyInputsOfTurnout.Match.newMatch(pT);
379 } 393 }
380 394
381 /** 395 /**
@@ -406,9 +420,9 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
406 } 420 }
407 421
408 @Override 422 @Override
409 protected TooManyExtraInputsOfTurnout.Match tupleToMatch(final Tuple t) { 423 protected TooManyInputsOfTurnout.Match tupleToMatch(final Tuple t) {
410 try { 424 try {
411 return TooManyExtraInputsOfTurnout.Match.newMatch((Turnout) t.get(POSITION_T)); 425 return TooManyInputsOfTurnout.Match.newMatch((Turnout) t.get(POSITION_T));
412 } catch(ClassCastException e) { 426 } catch(ClassCastException e) {
413 LOGGER.error("Element(s) in tuple not properly typed!",e); 427 LOGGER.error("Element(s) in tuple not properly typed!",e);
414 return null; 428 return null;
@@ -416,9 +430,9 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
416 } 430 }
417 431
418 @Override 432 @Override
419 protected TooManyExtraInputsOfTurnout.Match arrayToMatch(final Object[] match) { 433 protected TooManyInputsOfTurnout.Match arrayToMatch(final Object[] match) {
420 try { 434 try {
421 return TooManyExtraInputsOfTurnout.Match.newMatch((Turnout) match[POSITION_T]); 435 return TooManyInputsOfTurnout.Match.newMatch((Turnout) match[POSITION_T]);
422 } catch(ClassCastException e) { 436 } catch(ClassCastException e) {
423 LOGGER.error("Element(s) in array not properly typed!",e); 437 LOGGER.error("Element(s) in array not properly typed!",e);
424 return null; 438 return null;
@@ -426,9 +440,9 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
426 } 440 }
427 441
428 @Override 442 @Override
429 protected TooManyExtraInputsOfTurnout.Match arrayToMatchMutable(final Object[] match) { 443 protected TooManyInputsOfTurnout.Match arrayToMatchMutable(final Object[] match) {
430 try { 444 try {
431 return TooManyExtraInputsOfTurnout.Match.newMutableMatch((Turnout) match[POSITION_T]); 445 return TooManyInputsOfTurnout.Match.newMutableMatch((Turnout) match[POSITION_T]);
432 } catch(ClassCastException e) { 446 } catch(ClassCastException e) {
433 LOGGER.error("Element(s) in array not properly typed!",e); 447 LOGGER.error("Element(s) in array not properly typed!",e);
434 return null; 448 return null;
@@ -440,12 +454,12 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
440 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 454 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
441 * 455 *
442 */ 456 */
443 public static IQuerySpecification<TooManyExtraInputsOfTurnout.Matcher> querySpecification() { 457 public static IQuerySpecification<TooManyInputsOfTurnout.Matcher> querySpecification() {
444 return TooManyExtraInputsOfTurnout.instance(); 458 return TooManyInputsOfTurnout.instance();
445 } 459 }
446 } 460 }
447 461
448 private TooManyExtraInputsOfTurnout() { 462 private TooManyInputsOfTurnout() {
449 super(GeneratedPQuery.INSTANCE); 463 super(GeneratedPQuery.INSTANCE);
450 } 464 }
451 465
@@ -454,7 +468,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
454 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 468 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
455 * 469 *
456 */ 470 */
457 public static TooManyExtraInputsOfTurnout instance() { 471 public static TooManyInputsOfTurnout instance() {
458 try{ 472 try{
459 return LazyHolder.INSTANCE; 473 return LazyHolder.INSTANCE;
460 } catch (ExceptionInInitializerError err) { 474 } catch (ExceptionInInitializerError err) {
@@ -463,35 +477,35 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
463 } 477 }
464 478
465 @Override 479 @Override
466 protected TooManyExtraInputsOfTurnout.Matcher instantiate(final ViatraQueryEngine engine) { 480 protected TooManyInputsOfTurnout.Matcher instantiate(final ViatraQueryEngine engine) {
467 return TooManyExtraInputsOfTurnout.Matcher.on(engine); 481 return TooManyInputsOfTurnout.Matcher.on(engine);
468 } 482 }
469 483
470 @Override 484 @Override
471 public TooManyExtraInputsOfTurnout.Matcher instantiate() { 485 public TooManyInputsOfTurnout.Matcher instantiate() {
472 return TooManyExtraInputsOfTurnout.Matcher.create(); 486 return TooManyInputsOfTurnout.Matcher.create();
473 } 487 }
474 488
475 @Override 489 @Override
476 public TooManyExtraInputsOfTurnout.Match newEmptyMatch() { 490 public TooManyInputsOfTurnout.Match newEmptyMatch() {
477 return TooManyExtraInputsOfTurnout.Match.newEmptyMatch(); 491 return TooManyInputsOfTurnout.Match.newEmptyMatch();
478 } 492 }
479 493
480 @Override 494 @Override
481 public TooManyExtraInputsOfTurnout.Match newMatch(final Object... parameters) { 495 public TooManyInputsOfTurnout.Match newMatch(final Object... parameters) {
482 return TooManyExtraInputsOfTurnout.Match.newMatch((modes3.Turnout) parameters[0]); 496 return TooManyInputsOfTurnout.Match.newMatch((modes3.Turnout) parameters[0]);
483 } 497 }
484 498
485 /** 499 /**
486 * Inner class allowing the singleton instance of {@link TooManyExtraInputsOfTurnout} to be created 500 * Inner class allowing the singleton instance of {@link TooManyInputsOfTurnout} to be created
487 * <b>not</b> at the class load time of the outer class, 501 * <b>not</b> at the class load time of the outer class,
488 * but rather at the first call to {@link TooManyExtraInputsOfTurnout#instance()}. 502 * but rather at the first call to {@link TooManyInputsOfTurnout#instance()}.
489 * 503 *
490 * <p> This workaround is required e.g. to support recursion. 504 * <p> This workaround is required e.g. to support recursion.
491 * 505 *
492 */ 506 */
493 private static class LazyHolder { 507 private static class LazyHolder {
494 private static final TooManyExtraInputsOfTurnout INSTANCE = new TooManyExtraInputsOfTurnout(); 508 private static final TooManyInputsOfTurnout INSTANCE = new TooManyInputsOfTurnout();
495 509
496 /** 510 /**
497 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. 511 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
@@ -509,7 +523,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
509 } 523 }
510 524
511 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 525 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
512 private static final TooManyExtraInputsOfTurnout.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 526 private static final TooManyInputsOfTurnout.GeneratedPQuery INSTANCE = new GeneratedPQuery();
513 527
514 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT); 528 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT);
515 529
@@ -521,7 +535,7 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
521 535
522 @Override 536 @Override
523 public String getFullyQualifiedName() { 537 public String getFullyQualifiedName() {
524 return "modes3.queries.tooManyExtraInputsOfTurnout"; 538 return "modes3.queries.tooManyInputsOfTurnout";
525 } 539 }
526 540
527 @Override 541 @Override
@@ -543,21 +557,37 @@ public final class TooManyExtraInputsOfTurnout extends BaseGeneratedEMFQuerySpec
543 PVariable var_T = body.getOrCreateVariableByName("T"); 557 PVariable var_T = body.getOrCreateVariableByName("T");
544 PVariable var_I1 = body.getOrCreateVariableByName("I1"); 558 PVariable var_I1 = body.getOrCreateVariableByName("I1");
545 PVariable var_I2 = body.getOrCreateVariableByName("I2"); 559 PVariable var_I2 = body.getOrCreateVariableByName("I2");
560 PVariable var_I3 = body.getOrCreateVariableByName("I3");
561 PVariable var_I4 = body.getOrCreateVariableByName("I4");
546 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout"))); 562 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
547 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 563 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
548 new ExportedParameter(body, var_T, parameter_T) 564 new ExportedParameter(body, var_T, parameter_T)
549 )); 565 ));
550 // find extraInputOfTurnout(T, I1) 566 // find adjacent(I1, T)
551 new PositivePatternCall(body, Tuples.flatTupleOf(var_T, var_I1), ExtraInputOfTurnout.instance().getInternalQueryRepresentation()); 567 new PositivePatternCall(body, Tuples.flatTupleOf(var_I1, var_T), Adjacent.instance().getInternalQueryRepresentation());
552 // find extraInputOfTurnout(T, I2) 568 // find adjacent(I2, T)
553 new PositivePatternCall(body, Tuples.flatTupleOf(var_T, var_I2), ExtraInputOfTurnout.instance().getInternalQueryRepresentation()); 569 new PositivePatternCall(body, Tuples.flatTupleOf(var_I2, var_T), Adjacent.instance().getInternalQueryRepresentation());
570 // find adjacent(I3, T)
571 new PositivePatternCall(body, Tuples.flatTupleOf(var_I3, var_T), Adjacent.instance().getInternalQueryRepresentation());
572 // find adjacent(I4, T)
573 new PositivePatternCall(body, Tuples.flatTupleOf(var_I4, var_T), Adjacent.instance().getInternalQueryRepresentation());
554 // I1 != I2 574 // I1 != I2
555 new Inequality(body, var_I1, var_I2); 575 new Inequality(body, var_I1, var_I2);
576 // I1 != I3
577 new Inequality(body, var_I1, var_I3);
578 // I1 != I4
579 new Inequality(body, var_I1, var_I4);
580 // I2 != I3
581 new Inequality(body, var_I2, var_I3);
582 // I2 != I4
583 new Inequality(body, var_I2, var_I4);
584 // I3 != I4
585 new Inequality(body, var_I3, var_I4);
556 bodies.add(body); 586 bodies.add(body);
557 } 587 }
558 { 588 {
559 PAnnotation annotation = new PAnnotation("Constraint"); 589 PAnnotation annotation = new PAnnotation("Constraint");
560 annotation.addAttribute("message", "tooManyExtraInputsOfTurnout"); 590 annotation.addAttribute("message", "turnoutConnectedToBothOutputs");
561 annotation.addAttribute("severity", "error"); 591 annotation.addAttribute("severity", "error");
562 annotation.addAttribute("key", Arrays.asList(new Object[] { 592 annotation.addAttribute("key", Arrays.asList(new Object[] {
563 new ParameterReference("T") 593 new ParameterReference("T")
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Turnout.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Turnout.java
deleted file mode 100644
index 34c7631c..00000000
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Turnout.java
+++ /dev/null
@@ -1,543 +0,0 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql
3 */
4package modes3.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern turnout(T : Turnout) {
44 * Turnout(T);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class Turnout extends BaseGeneratedEMFQuerySpecification<Turnout.Matcher> {
54 /**
55 * Pattern-specific match representation of the modes3.queries.turnout pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private modes3.Turnout fT;
68
69 private static List<String> parameterNames = makeImmutableList("T");
70
71 private Match(final modes3.Turnout pT) {
72 this.fT = pT;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 switch(parameterName) {
78 case "T": return this.fT;
79 default: return null;
80 }
81 }
82
83 @Override
84 public Object get(final int index) {
85 switch(index) {
86 case 0: return this.fT;
87 default: return null;
88 }
89 }
90
91 public modes3.Turnout getT() {
92 return this.fT;
93 }
94
95 @Override
96 public boolean set(final String parameterName, final Object newValue) {
97 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
98 if ("T".equals(parameterName) ) {
99 this.fT = (modes3.Turnout) newValue;
100 return true;
101 }
102 return false;
103 }
104
105 public void setT(final modes3.Turnout pT) {
106 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
107 this.fT = pT;
108 }
109
110 @Override
111 public String patternName() {
112 return "modes3.queries.turnout";
113 }
114
115 @Override
116 public List<String> parameterNames() {
117 return Turnout.Match.parameterNames;
118 }
119
120 @Override
121 public Object[] toArray() {
122 return new Object[]{fT};
123 }
124
125 @Override
126 public Turnout.Match toImmutable() {
127 return isMutable() ? newMatch(fT) : this;
128 }
129
130 @Override
131 public String prettyPrint() {
132 StringBuilder result = new StringBuilder();
133 result.append("\"T\"=" + prettyPrintValue(fT));
134 return result.toString();
135 }
136
137 @Override
138 public int hashCode() {
139 return Objects.hash(fT);
140 }
141
142 @Override
143 public boolean equals(final Object obj) {
144 if (this == obj)
145 return true;
146 if (obj == null) {
147 return false;
148 }
149 if ((obj instanceof Turnout.Match)) {
150 Turnout.Match other = (Turnout.Match) obj;
151 return Objects.equals(fT, other.fT);
152 } else {
153 // this should be infrequent
154 if (!(obj instanceof IPatternMatch)) {
155 return false;
156 }
157 IPatternMatch otherSig = (IPatternMatch) obj;
158 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
159 }
160 }
161
162 @Override
163 public Turnout specification() {
164 return Turnout.instance();
165 }
166
167 /**
168 * Returns an empty, mutable match.
169 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
170 *
171 * @return the empty match.
172 *
173 */
174 public static Turnout.Match newEmptyMatch() {
175 return new Mutable(null);
176 }
177
178 /**
179 * Returns a mutable (partial) match.
180 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
181 *
182 * @param pT the fixed value of pattern parameter T, or null if not bound.
183 * @return the new, mutable (partial) match object.
184 *
185 */
186 public static Turnout.Match newMutableMatch(final modes3.Turnout pT) {
187 return new Mutable(pT);
188 }
189
190 /**
191 * Returns a new (partial) match.
192 * This can be used e.g. to call the matcher with a partial match.
193 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
194 * @param pT the fixed value of pattern parameter T, or null if not bound.
195 * @return the (partial) match object.
196 *
197 */
198 public static Turnout.Match newMatch(final modes3.Turnout pT) {
199 return new Immutable(pT);
200 }
201
202 private static final class Mutable extends Turnout.Match {
203 Mutable(final modes3.Turnout pT) {
204 super(pT);
205 }
206
207 @Override
208 public boolean isMutable() {
209 return true;
210 }
211 }
212
213 private static final class Immutable extends Turnout.Match {
214 Immutable(final modes3.Turnout pT) {
215 super(pT);
216 }
217
218 @Override
219 public boolean isMutable() {
220 return false;
221 }
222 }
223 }
224
225 /**
226 * Generated pattern matcher API of the modes3.queries.turnout pattern,
227 * providing pattern-specific query methods.
228 *
229 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
230 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
231 *
232 * <p>Matches of the pattern will be represented as {@link Match}.
233 *
234 * <p>Original source:
235 * <code><pre>
236 * pattern turnout(T : Turnout) {
237 * Turnout(T);
238 * }
239 * </pre></code>
240 *
241 * @see Match
242 * @see Turnout
243 *
244 */
245 public static class Matcher extends BaseMatcher<Turnout.Match> {
246 /**
247 * Initializes the pattern matcher within an existing VIATRA Query engine.
248 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
249 *
250 * @param engine the existing VIATRA Query engine in which this matcher will be created.
251 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
252 *
253 */
254 public static Turnout.Matcher on(final ViatraQueryEngine engine) {
255 // check if matcher already exists
256 Matcher matcher = engine.getExistingMatcher(querySpecification());
257 if (matcher == null) {
258 matcher = (Matcher)engine.getMatcher(querySpecification());
259 }
260 return matcher;
261 }
262
263 /**
264 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
265 * @return an initialized matcher
266 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
267 *
268 */
269 public static Turnout.Matcher create() {
270 return new Matcher();
271 }
272
273 private static final int POSITION_T = 0;
274
275 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Turnout.Matcher.class);
276
277 /**
278 * Initializes the pattern matcher within an existing VIATRA Query engine.
279 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
280 *
281 * @param engine the existing VIATRA Query engine in which this matcher will be created.
282 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
283 *
284 */
285 private Matcher() {
286 super(querySpecification());
287 }
288
289 /**
290 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
291 * @param pT the fixed value of pattern parameter T, or null if not bound.
292 * @return matches represented as a Match object.
293 *
294 */
295 public Collection<Turnout.Match> getAllMatches(final modes3.Turnout pT) {
296 return rawStreamAllMatches(new Object[]{pT}).collect(Collectors.toSet());
297 }
298
299 /**
300 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
301 * </p>
302 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
303 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
304 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
305 * @param pT the fixed value of pattern parameter T, or null if not bound.
306 * @return a stream of matches represented as a Match object.
307 *
308 */
309 public Stream<Turnout.Match> streamAllMatches(final modes3.Turnout pT) {
310 return rawStreamAllMatches(new Object[]{pT});
311 }
312
313 /**
314 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
315 * Neither determinism nor randomness of selection is guaranteed.
316 * @param pT the fixed value of pattern parameter T, or null if not bound.
317 * @return a match represented as a Match object, or null if no match is found.
318 *
319 */
320 public Optional<Turnout.Match> getOneArbitraryMatch(final modes3.Turnout pT) {
321 return rawGetOneArbitraryMatch(new Object[]{pT});
322 }
323
324 /**
325 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
326 * under any possible substitution of the unspecified parameters (if any).
327 * @param pT the fixed value of pattern parameter T, or null if not bound.
328 * @return true if the input is a valid (partial) match of the pattern.
329 *
330 */
331 public boolean hasMatch(final modes3.Turnout pT) {
332 return rawHasMatch(new Object[]{pT});
333 }
334
335 /**
336 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
337 * @param pT the fixed value of pattern parameter T, or null if not bound.
338 * @return the number of pattern matches found.
339 *
340 */
341 public int countMatches(final modes3.Turnout pT) {
342 return rawCountMatches(new Object[]{pT});
343 }
344
345 /**
346 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
347 * Neither determinism nor randomness of selection is guaranteed.
348 * @param pT the fixed value of pattern parameter T, or null if not bound.
349 * @param processor the action that will process the selected match.
350 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
351 *
352 */
353 public boolean forOneArbitraryMatch(final modes3.Turnout pT, final Consumer<? super Turnout.Match> processor) {
354 return rawForOneArbitraryMatch(new Object[]{pT}, processor);
355 }
356
357 /**
358 * Returns a new (partial) match.
359 * This can be used e.g. to call the matcher with a partial match.
360 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
361 * @param pT the fixed value of pattern parameter T, or null if not bound.
362 * @return the (partial) match object.
363 *
364 */
365 public Turnout.Match newMatch(final modes3.Turnout pT) {
366 return Turnout.Match.newMatch(pT);
367 }
368
369 /**
370 * Retrieve the set of values that occur in matches for T.
371 * @return the Set of all values or empty set if there are no matches
372 *
373 */
374 protected Stream<modes3.Turnout> rawStreamAllValuesOfT(final Object[] parameters) {
375 return rawStreamAllValues(POSITION_T, parameters).map(modes3.Turnout.class::cast);
376 }
377
378 /**
379 * Retrieve the set of values that occur in matches for T.
380 * @return the Set of all values or empty set if there are no matches
381 *
382 */
383 public Set<modes3.Turnout> getAllValuesOfT() {
384 return rawStreamAllValuesOfT(emptyArray()).collect(Collectors.toSet());
385 }
386
387 /**
388 * Retrieve the set of values that occur in matches for T.
389 * @return the Set of all values or empty set if there are no matches
390 *
391 */
392 public Stream<modes3.Turnout> streamAllValuesOfT() {
393 return rawStreamAllValuesOfT(emptyArray());
394 }
395
396 @Override
397 protected Turnout.Match tupleToMatch(final Tuple t) {
398 try {
399 return Turnout.Match.newMatch((modes3.Turnout) t.get(POSITION_T));
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in tuple not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected Turnout.Match arrayToMatch(final Object[] match) {
408 try {
409 return Turnout.Match.newMatch((modes3.Turnout) match[POSITION_T]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 @Override
417 protected Turnout.Match arrayToMatchMutable(final Object[] match) {
418 try {
419 return Turnout.Match.newMutableMatch((modes3.Turnout) match[POSITION_T]);
420 } catch(ClassCastException e) {
421 LOGGER.error("Element(s) in array not properly typed!",e);
422 return null;
423 }
424 }
425
426 /**
427 * @return the singleton instance of the query specification of this pattern
428 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
429 *
430 */
431 public static IQuerySpecification<Turnout.Matcher> querySpecification() {
432 return Turnout.instance();
433 }
434 }
435
436 private Turnout() {
437 super(GeneratedPQuery.INSTANCE);
438 }
439
440 /**
441 * @return the singleton instance of the query specification
442 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
443 *
444 */
445 public static Turnout instance() {
446 try{
447 return LazyHolder.INSTANCE;
448 } catch (ExceptionInInitializerError err) {
449 throw processInitializerError(err);
450 }
451 }
452
453 @Override
454 protected Turnout.Matcher instantiate(final ViatraQueryEngine engine) {
455 return Turnout.Matcher.on(engine);
456 }
457
458 @Override
459 public Turnout.Matcher instantiate() {
460 return Turnout.Matcher.create();
461 }
462
463 @Override
464 public Turnout.Match newEmptyMatch() {
465 return Turnout.Match.newEmptyMatch();
466 }
467
468 @Override
469 public Turnout.Match newMatch(final Object... parameters) {
470 return Turnout.Match.newMatch((modes3.Turnout) parameters[0]);
471 }
472
473 /**
474 * Inner class allowing the singleton instance of {@link Turnout} to be created
475 * <b>not</b> at the class load time of the outer class,
476 * but rather at the first call to {@link Turnout#instance()}.
477 *
478 * <p> This workaround is required e.g. to support recursion.
479 *
480 */
481 private static class LazyHolder {
482 private static final Turnout INSTANCE = new Turnout();
483
484 /**
485 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
486 * This initialization order is required to support indirect recursion.
487 *
488 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
489 *
490 */
491 private static final Object STATIC_INITIALIZER = ensureInitialized();
492
493 public static Object ensureInitialized() {
494 INSTANCE.ensureInitializedInternal();
495 return null;
496 }
497 }
498
499 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
500 private static final Turnout.GeneratedPQuery INSTANCE = new GeneratedPQuery();
501
502 private final PParameter parameter_T = new PParameter("T", "modes3.Turnout", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")), PParameterDirection.INOUT);
503
504 private final List<PParameter> parameters = Arrays.asList(parameter_T);
505
506 private GeneratedPQuery() {
507 super(PVisibility.PUBLIC);
508 }
509
510 @Override
511 public String getFullyQualifiedName() {
512 return "modes3.queries.turnout";
513 }
514
515 @Override
516 public List<String> getParameterNames() {
517 return Arrays.asList("T");
518 }
519
520 @Override
521 public List<PParameter> getParameters() {
522 return parameters;
523 }
524
525 @Override
526 public Set<PBody> doGetContainedBodies() {
527 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
528 Set<PBody> bodies = new LinkedHashSet<>();
529 {
530 PBody body = new PBody(this);
531 PVariable var_T = body.getOrCreateVariableByName("T");
532 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
533 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
534 new ExportedParameter(body, var_T, parameter_T)
535 ));
536 // Turnout(T)
537 new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Turnout")));
538 bodies.add(body);
539 }
540 return bodies;
541 }
542 }
543}
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin
index 4f542a67..77f1ea6e 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin
Binary files differ
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbin
new file mode 100644
index 00000000..4fdbb71b
--- /dev/null
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbin
Binary files differ
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin
index 28e763b9..e5e1b63e 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin
Binary files differ
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore
index 53dcf60f..fb94df96 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore
@@ -1,2 +1,3 @@
1/.Modes3ModelGenerator.java._trace 1/.Modes3ModelGenerator.java._trace
2/.Modes3UnitPropagationGenerator.java._trace 2/.Modes3UnitPropagationGenerator.java._trace
3/.Modes3TypeScopeHint.java._trace
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java
index c7364257..f32a7172 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java
@@ -12,7 +12,9 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor;
12import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsFactory; 12import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsFactory;
13import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage; 13import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage;
14import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion; 14import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion;
15import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel;
15import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder; 16import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder;
17import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolutionScope;
16import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput; 18import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput;
17import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes; 19import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes;
18import hu.bme.mit.inf.dslreasoner.logic.model.builder.VariableContext; 20import hu.bme.mit.inf.dslreasoner.logic.model.builder.VariableContext;
@@ -48,6 +50,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par
48import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink; 50import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink;
49import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml; 51import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml;
50import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualisation; 52import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualisation;
53import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DebugConfiguration;
51import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.StateCoderStrategy; 54import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.StateCoderStrategy;
52import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner; 55import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner;
53import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration; 56import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration;
@@ -57,12 +60,13 @@ import java.util.Collections;
57import java.util.List; 60import java.util.List;
58import java.util.Map; 61import java.util.Map;
59import java.util.Set; 62import java.util.Set;
60import java.util.function.Consumer;
61import java.util.function.Predicate; 63import java.util.function.Predicate;
62import modes3.Modes3Factory; 64import modes3.Modes3Factory;
63import modes3.Modes3ModelRoot; 65import modes3.Modes3ModelRoot;
64import modes3.Modes3Package; 66import modes3.Modes3Package;
65import modes3.queries.Modes3Queries; 67import modes3.queries.Modes3Queries;
68import modes3.run.Modes3TypeScopeHint;
69import modes3.run.Modes3UnitPropagationGenerator;
66import org.eclipse.emf.common.util.EList; 70import org.eclipse.emf.common.util.EList;
67import org.eclipse.emf.common.util.URI; 71import org.eclipse.emf.common.util.URI;
68import org.eclipse.emf.ecore.EAttribute; 72import org.eclipse.emf.ecore.EAttribute;
@@ -175,29 +179,47 @@ public class Modes3ModelGenerator {
175 it_1.minNewElements = this.modelSize; 179 it_1.minNewElements = this.modelSize;
176 it_1.maxNewElements = this.modelSize; 180 it_1.maxNewElements = this.modelSize;
177 final Procedure1<Map<Type, Integer>> _function_4 = (Map<Type, Integer> it_2) -> { 181 final Procedure1<Map<Type, Integer>> _function_4 = (Map<Type, Integer> it_2) -> {
178 it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTurnout()), Integer.valueOf(1));
179 }; 182 };
180 ObjectExtensions.<Map<Type, Integer>>operator_doubleArrow( 183 ObjectExtensions.<Map<Type, Integer>>operator_doubleArrow(
181 it_1.minNewElementsByType, _function_4); 184 it_1.minNewElementsByType, _function_4);
182 final Procedure1<Map<Type, Integer>> _function_5 = (Map<Type, Integer> it_2) -> { 185 final Procedure1<Map<Type, Integer>> _function_5 = (Map<Type, Integer> it_2) -> {
183 it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTrain()), Integer.valueOf(5)); 186 it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTrain()), Integer.valueOf(5));
187 it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTurnout()), Integer.valueOf(5));
184 }; 188 };
185 ObjectExtensions.<Map<Type, Integer>>operator_doubleArrow( 189 ObjectExtensions.<Map<Type, Integer>>operator_doubleArrow(
186 it_1.maxNewElementsByType, _function_5); 190 it_1.maxNewElementsByType, _function_5);
187 }; 191 };
188 ObjectExtensions.<TypeScopes>operator_doubleArrow( 192 ObjectExtensions.<TypeScopes>operator_doubleArrow(
189 it.typeScopes, _function_3); 193 it.typeScopes, _function_3);
190 it.solutionScope.numberOfRequiredSolutions = 1; 194 final Procedure1<SolutionScope> _function_4 = (SolutionScope it_1) -> {
195 it_1.numberOfRequiredSolutions = 1;
196 };
197 ObjectExtensions.<SolutionScope>operator_doubleArrow(
198 it.solutionScope, _function_4);
199 it.scopeWeight = 5;
191 it.nameNewElements = false; 200 it.nameNewElements = false;
192 it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis; 201 it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis;
193 it.stateCoderStrategy = StateCoderStrategy.Neighbourhood; 202 it.stateCoderStrategy = StateCoderStrategy.PairwiseNeighbourhood;
194 ScopePropagatorStrategy.Polyhedral _polyhedral = new ScopePropagatorStrategy.Polyhedral( 203 ScopePropagatorStrategy.Polyhedral _polyhedral = new ScopePropagatorStrategy.Polyhedral(
195 PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp); 204 PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp);
196 it.scopePropagatorStrategy = _polyhedral; 205 it.scopePropagatorStrategy = _polyhedral;
197 it.debugConfiguration.partialInterpretatioVisualiser = null; 206 Ecore2Logic_Trace _trace = metamodelLogic.getTrace();
207 Modes3TypeScopeHint _modes3TypeScopeHint = new Modes3TypeScopeHint(this.ecore2Logic, _trace);
208 it.hints.add(_modes3TypeScopeHint);
209 Ecore2Logic_Trace _trace_1 = metamodelLogic.getTrace();
210 Modes3UnitPropagationGenerator _modes3UnitPropagationGenerator = new Modes3UnitPropagationGenerator(this.ecore2Logic, _trace_1);
211 it.unitPropagationPatternGenerators.add(_modes3UnitPropagationGenerator);
212 final Procedure1<DebugConfiguration> _function_5 = (DebugConfiguration it_1) -> {
213 GraphvizVisualiser _graphvizVisualiser = new GraphvizVisualiser();
214 it_1.partialInterpretatioVisualiser = _graphvizVisualiser;
215 };
216 ObjectExtensions.<DebugConfiguration>operator_doubleArrow(
217 it.debugConfiguration, _function_5);
218 it.documentationLevel = DocumentationLevel.NORMAL;
198 }; 219 };
199 final ViatraReasonerConfiguration config = ObjectExtensions.<ViatraReasonerConfiguration>operator_doubleArrow(_viatraReasonerConfiguration, _function_2); 220 final ViatraReasonerConfiguration config = ObjectExtensions.<ViatraReasonerConfiguration>operator_doubleArrow(_viatraReasonerConfiguration, _function_2);
200 final FileSystemWorkspace workspace = new FileSystemWorkspace("output/", ""); 221 final FileSystemWorkspace workspace = new FileSystemWorkspace("output/", "");
222 workspace.writeModel(logic.getOutput(), "problem.logicproblem");
201 final LogicResult solution = this.solver.solve(logic.getOutput(), config, workspace); 223 final LogicResult solution = this.solver.solve(logic.getOutput(), config, workspace);
202 URI _xifexpression = null; 224 URI _xifexpression = null;
203 if ((solution instanceof ModelResult)) { 225 if ((solution instanceof ModelResult)) {
@@ -226,27 +248,23 @@ public class Modes3ModelGenerator {
226 boolean _lessThan = (_size_1 < 160); 248 boolean _lessThan = (_size_1 < 160);
227 if (_lessThan) { 249 if (_lessThan) {
228 if ((representation instanceof PartialInterpretation)) { 250 if ((representation instanceof PartialInterpretation)) {
229 final Consumer<Type> _function_3 = (Type it) -> { 251 final Function1<Type, Boolean> _function_3 = (Type it) -> {
230 InputOutput.<String>println(it.getName());
231 };
232 ((PartialInterpretation)representation).getProblem().getTypes().forEach(_function_3);
233 final Function1<Type, Boolean> _function_4 = (Type it) -> {
234 String _name_2 = it.getName(); 252 String _name_2 = it.getName();
235 return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class DefinedPart")); 253 return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class DefinedPart"));
236 }; 254 };
237 Type _findFirst = IterableExtensions.<Type>findFirst(((PartialInterpretation)representation).getProblem().getTypes(), _function_4); 255 Type _findFirst = IterableExtensions.<Type>findFirst(((PartialInterpretation)representation).getProblem().getTypes(), _function_3);
238 final TypeDefinition rootType = ((TypeDefinition) _findFirst); 256 final TypeDefinition rootType = ((TypeDefinition) _findFirst);
239 final Function1<PartialComplexTypeInterpretation, Boolean> _function_5 = (PartialComplexTypeInterpretation it) -> { 257 final Function1<PartialComplexTypeInterpretation, Boolean> _function_4 = (PartialComplexTypeInterpretation it) -> {
240 String _name_2 = it.getInterpretationOf().getName(); 258 String _name_2 = it.getInterpretationOf().getName();
241 return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class")); 259 return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class"));
242 }; 260 };
243 final PartialComplexTypeInterpretation rootIntepretation = IterableExtensions.<PartialComplexTypeInterpretation>findFirst(Iterables.<PartialComplexTypeInterpretation>filter(((PartialInterpretation)representation).getPartialtypeinterpratation(), 261 final PartialComplexTypeInterpretation rootIntepretation = IterableExtensions.<PartialComplexTypeInterpretation>findFirst(Iterables.<PartialComplexTypeInterpretation>filter(((PartialInterpretation)representation).getPartialtypeinterpratation(),
244 PartialComplexTypeInterpretation.class), _function_5); 262 PartialComplexTypeInterpretation.class), _function_4);
245 rootIntepretation.getElements().removeAll(rootType.getElements()); 263 rootIntepretation.getElements().removeAll(rootType.getElements());
246 ((PartialInterpretation)representation).getProblem().getElements().removeAll(rootType.getElements()); 264 ((PartialInterpretation)representation).getProblem().getElements().removeAll(rootType.getElements());
247 EList<PartialRelationInterpretation> _partialrelationinterpretation = ((PartialInterpretation)representation).getPartialrelationinterpretation(); 265 EList<PartialRelationInterpretation> _partialrelationinterpretation = ((PartialInterpretation)representation).getPartialrelationinterpretation();
248 for (final PartialRelationInterpretation relationInterpretation : _partialrelationinterpretation) { 266 for (final PartialRelationInterpretation relationInterpretation : _partialrelationinterpretation) {
249 final Predicate<RelationLink> _function_6 = (RelationLink link) -> { 267 final Predicate<RelationLink> _function_5 = (RelationLink link) -> {
250 boolean _xifexpression_1 = false; 268 boolean _xifexpression_1 = false;
251 if ((link instanceof BinaryElementRelationLink)) { 269 if ((link instanceof BinaryElementRelationLink)) {
252 _xifexpression_1 = (rootType.getElements().contains(((BinaryElementRelationLink)link).getParam1()) || rootType.getElements().contains(((BinaryElementRelationLink)link).getParam2())); 270 _xifexpression_1 = (rootType.getElements().contains(((BinaryElementRelationLink)link).getParam1()) || rootType.getElements().contains(((BinaryElementRelationLink)link).getParam2()));
@@ -255,7 +273,7 @@ public class Modes3ModelGenerator {
255 } 273 }
256 return _xifexpression_1; 274 return _xifexpression_1;
257 }; 275 };
258 relationInterpretation.getRelationlinks().removeIf(_function_6); 276 relationInterpretation.getRelationlinks().removeIf(_function_5);
259 } 277 }
260 rootType.getElements().clear(); 278 rootType.getElements().clear();
261 } 279 }
@@ -349,13 +367,7 @@ public class Modes3ModelGenerator {
349 Viatra2LogicAnnotationsPackage.eINSTANCE.getClass(); 367 Viatra2LogicAnnotationsPackage.eINSTANCE.getClass();
350 Map<String, Object> _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); 368 Map<String, Object> _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap();
351 XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); 369 XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl();
352 _extensionToFactoryMap.put("ecore", _xMIResourceFactoryImpl); 370 _xblockexpression = _extensionToFactoryMap.put("*", _xMIResourceFactoryImpl);
353 Map<String, Object> _extensionToFactoryMap_1 = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap();
354 XMIResourceFactoryImpl _xMIResourceFactoryImpl_1 = new XMIResourceFactoryImpl();
355 _extensionToFactoryMap_1.put("logicproblem", _xMIResourceFactoryImpl_1);
356 Map<String, Object> _extensionToFactoryMap_2 = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap();
357 XMIResourceFactoryImpl _xMIResourceFactoryImpl_2 = new XMIResourceFactoryImpl();
358 _xblockexpression = _extensionToFactoryMap_2.put("partialinterpretation", _xMIResourceFactoryImpl_2);
359 } 371 }
360 return _xblockexpression; 372 return _xblockexpression;
361 } 373 }
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3TypeScopeHint.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3TypeScopeHint.java
new file mode 100644
index 00000000..adb69760
--- /dev/null
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3TypeScopeHint.java
@@ -0,0 +1,133 @@
1package modes3.run;
2
3import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic;
4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace;
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type;
6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality;
7import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearBoundedExpression;
8import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint;
9import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory;
10import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraintUpdater;
11import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator;
12import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation;
13import java.util.Iterator;
14import java.util.Map;
15import modes3.Modes3Package;
16import modes3.queries.Adjacent;
17import org.eclipse.viatra.query.runtime.api.IPatternMatch;
18import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher;
19import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery;
20import org.eclipse.xtend2.lib.StringConcatenation;
21import org.eclipse.xtext.xbase.lib.Extension;
22
23@SuppressWarnings("all")
24public class Modes3TypeScopeHint implements LinearTypeConstraintHint {
25 private static final String TURNOUT_NEIGHBOR_COUNT = "turnoutNeighborCount";
26
27 private final Type segmentType;
28
29 private final Type turnoutType;
30
31 public Modes3TypeScopeHint(@Extension final Ecore2Logic ecore2Logic, final Ecore2Logic_Trace ecore2LogicTrace) {
32 @Extension
33 final Modes3Package Modes3Package = modes3.Modes3Package.eINSTANCE;
34 this.segmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSegment());
35 this.turnoutType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTurnout());
36 }
37
38 @Override
39 public CharSequence getAdditionalPatterns(@Extension final PatternGenerator patternGenerator, final Map<String, PQuery> fqnToPQuery) {
40 StringConcatenation _builder = new StringConcatenation();
41 _builder.append("\t");
42 _builder.append("pattern ");
43 _builder.append(Modes3TypeScopeHint.TURNOUT_NEIGHBOR_COUNT, "\t");
44 _builder.append("_helper(problem: LogicProblem, interpretation: PartialInterpretation, source: DefinedElement, target: DefinedElement) {");
45 _builder.newLineIfNotEmpty();
46 _builder.append("\t\t");
47 _builder.append("find interpretation(problem, interpretation);");
48 _builder.newLine();
49 _builder.append("\t\t");
50 _builder.append("find mustExist(problem, interpretation, source);");
51 _builder.newLine();
52 _builder.append("\t\t");
53 _builder.append("find mustExist(problem, interpretation, target);");
54 _builder.newLine();
55 _builder.append("\t\t");
56 CharSequence _referInstanceOf = patternGenerator.getTypeIndexer().referInstanceOf(this.turnoutType, Modality.MUST, "source");
57 _builder.append(_referInstanceOf, "\t\t");
58 _builder.newLineIfNotEmpty();
59 _builder.append("\t\t");
60 CharSequence _referInstanceOf_1 = patternGenerator.getTypeIndexer().referInstanceOf(this.segmentType, Modality.MUST, "target");
61 _builder.append(_referInstanceOf_1, "\t\t");
62 _builder.newLineIfNotEmpty();
63 _builder.append("\t\t");
64 CharSequence _referPattern = patternGenerator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "source", "target" }, Modality.MUST, true, false);
65 _builder.append(_referPattern, "\t\t");
66 _builder.newLineIfNotEmpty();
67 _builder.append("\t");
68 _builder.append("}");
69 _builder.newLine();
70 _builder.newLine();
71 _builder.append("\t");
72 _builder.append("pattern ");
73 _builder.append(Modes3TypeScopeHint.TURNOUT_NEIGHBOR_COUNT, "\t");
74 _builder.append("(problem: LogicProblem, interpretation: PartialInterpretation, element: DefinedElement, N) {");
75 _builder.newLineIfNotEmpty();
76 _builder.append("\t\t");
77 _builder.append("find interpretation(problem, interpretation);");
78 _builder.newLine();
79 _builder.append("\t\t");
80 _builder.append("find mustExist(problem, interpretation, element);");
81 _builder.newLine();
82 _builder.append("\t\t");
83 CharSequence _referInstanceOf_2 = patternGenerator.getTypeIndexer().referInstanceOf(this.turnoutType, Modality.MUST, "element");
84 _builder.append(_referInstanceOf_2, "\t\t");
85 _builder.newLineIfNotEmpty();
86 _builder.append("\t\t");
87 _builder.append("N == count find ");
88 _builder.append(Modes3TypeScopeHint.TURNOUT_NEIGHBOR_COUNT, "\t\t");
89 _builder.append("_helper(problem, interpretation, element, _);");
90 _builder.newLineIfNotEmpty();
91 _builder.append("\t");
92 _builder.append("}");
93 _builder.newLine();
94 return _builder;
95 }
96
97 @Override
98 public RelationConstraintUpdater createConstraintUpdater(final LinearTypeExpressionBuilderFactory builderFactory) {
99 final ViatraQueryMatcher<? extends IPatternMatch> turnoutNeighborCountMatcher = builderFactory.createMatcher(Modes3TypeScopeHint.TURNOUT_NEIGHBOR_COUNT);
100 final LinearBoundedExpression newNeighbors = builderFactory.createBuilder().add(1, this.segmentType).build();
101 final RelationConstraintUpdater _function = (PartialInterpretation partialInterpretation) -> {
102 final int requiredNeighbbors = Modes3TypeScopeHint.getRemainingCount(turnoutNeighborCountMatcher, partialInterpretation, 3);
103 newNeighbors.tightenLowerBound(Integer.valueOf(requiredNeighbbors));
104 };
105 return _function;
106 }
107
108 private static <T extends IPatternMatch> int getRemainingCount(final ViatraQueryMatcher<T> matcher, final PartialInterpretation partialInterpretation, final int capacity) {
109 int _xblockexpression = (int) 0;
110 {
111 final T partialMatch = matcher.newEmptyMatch();
112 partialMatch.set(0, partialInterpretation.getProblem());
113 partialMatch.set(1, partialInterpretation);
114 final Iterator<T> iterator = matcher.streamAllMatches(partialMatch).iterator();
115 int max = 0;
116 while (iterator.hasNext()) {
117 {
118 final T match = iterator.next();
119 Object _get = match.get(3);
120 final int n = ((Integer) _get).intValue();
121 if ((n < capacity)) {
122 final int required = (capacity - n);
123 if ((max < required)) {
124 max = required;
125 }
126 }
127 }
128 }
129 _xblockexpression = max;
130 }
131 return _xblockexpression;
132 }
133}
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3UnitPropagationGenerator.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3UnitPropagationGenerator.java
index 91adaaaa..5c5f82c5 100644
--- a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3UnitPropagationGenerator.java
+++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3UnitPropagationGenerator.java
@@ -10,9 +10,8 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.UnitPropaga
10import java.util.Collections; 10import java.util.Collections;
11import java.util.Map; 11import java.util.Map;
12import modes3.Modes3Package; 12import modes3.Modes3Package;
13import modes3.queries.ExtraInputOfTurnout; 13import modes3.queries.Adjacent;
14import modes3.queries.Output; 14import modes3.queries.Output;
15import modes3.queries.TurnoutOutput;
16import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery; 15import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery;
17import org.eclipse.xtend2.lib.StringConcatenationClient; 16import org.eclipse.xtend2.lib.StringConcatenationClient;
18import org.eclipse.xtext.xbase.lib.CollectionLiterals; 17import org.eclipse.xtext.xbase.lib.CollectionLiterals;
@@ -23,16 +22,20 @@ import org.eclipse.xtext.xbase.lib.Pair;
23public class Modes3UnitPropagationGenerator implements UnitPropagationPatternGenerator { 22public class Modes3UnitPropagationGenerator implements UnitPropagationPatternGenerator {
24 private static final String MUST_NOT_CONNECTED_TO = "mustNotConnectedTo"; 23 private static final String MUST_NOT_CONNECTED_TO = "mustNotConnectedTo";
25 24
26 private static final String MUST_NOT_CONNECTED_TO_HELPER = "mustNotConnectedTo_helper";
27
28 private static final String MUST_NOT_TURNOUT_OUTPUT = "mustNotTurnoutOutput";
29
30 private static final String MUST_NOT_STRAIGHT = "mustNotStraight"; 25 private static final String MUST_NOT_STRAIGHT = "mustNotStraight";
31 26
32 private static final String MUST_NOT_DIVERGENT = "mustNotDivergent"; 27 private static final String MUST_NOT_DIVERGENT = "mustNotDivergent";
33 28
29 private static final String MUST_CONNECTED_TO = "mustConnectedTo";
30
31 private static final String MUST_STRAIGHT = "mustStraight";
32
33 private static final String MUST_DIVERGENT = "mustDivergent";
34
34 private final Type segmentType; 35 private final Type segmentType;
35 36
37 private final Type simpleSegmentType;
38
36 private final Type turnoutType; 39 private final Type turnoutType;
37 40
38 private final Relation connectedToRelation; 41 private final Relation connectedToRelation;
@@ -45,6 +48,7 @@ public class Modes3UnitPropagationGenerator implements UnitPropagationPatternGen
45 @Extension 48 @Extension
46 final Modes3Package Modes3Package = modes3.Modes3Package.eINSTANCE; 49 final Modes3Package Modes3Package = modes3.Modes3Package.eINSTANCE;
47 this.segmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSegment()); 50 this.segmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSegment());
51 this.simpleSegmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSimpleSegment());
48 this.turnoutType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTurnout()); 52 this.turnoutType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTurnout());
49 this.connectedToRelation = ecore2Logic.relationOfReference(ecore2LogicTrace, Modes3Package.getSegment_ConnectedTo()); 53 this.connectedToRelation = ecore2Logic.relationOfReference(ecore2LogicTrace, Modes3Package.getSegment_ConnectedTo());
50 this.straightRelation = ecore2Logic.relationOfReference(ecore2LogicTrace, Modes3Package.getTurnout_Straight()); 54 this.straightRelation = ecore2Logic.relationOfReference(ecore2LogicTrace, Modes3Package.getTurnout_Straight());
@@ -53,7 +57,10 @@ public class Modes3UnitPropagationGenerator implements UnitPropagationPatternGen
53 57
54 @Override 58 @Override
55 public Map<Relation, String> getMustPatterns() { 59 public Map<Relation, String> getMustPatterns() {
56 return CollectionLiterals.<Relation, String>emptyMap(); 60 Pair<Relation, String> _mappedTo = Pair.<Relation, String>of(this.connectedToRelation, Modes3UnitPropagationGenerator.MUST_CONNECTED_TO);
61 Pair<Relation, String> _mappedTo_1 = Pair.<Relation, String>of(this.straightRelation, Modes3UnitPropagationGenerator.MUST_STRAIGHT);
62 Pair<Relation, String> _mappedTo_2 = Pair.<Relation, String>of(this.divergentRelation, Modes3UnitPropagationGenerator.MUST_DIVERGENT);
63 return Collections.<Relation, String>unmodifiableMap(CollectionLiterals.<Relation, String>newHashMap(_mappedTo, _mappedTo_1, _mappedTo_2));
57 } 64 }
58 65
59 @Override 66 @Override
@@ -89,496 +96,1078 @@ public class Modes3UnitPropagationGenerator implements UnitPropagationPatternGen
89 _builder.newLine(); 96 _builder.newLine();
90 } 97 }
91 }; 98 };
92 final StringConcatenationClient commonParameterConstraints = _client_1; 99 final StringConcatenationClient commonMustParameterConstraints = _client_1;
93 StringConcatenationClient _client_2 = new StringConcatenationClient() { 100 StringConcatenationClient _client_2 = new StringConcatenationClient() {
94 @Override 101 @Override
95 protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { 102 protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
103 _builder.append("find interpretation(problem, interpretation);");
104 _builder.newLine();
105 _builder.append("find mayExist(problem, interpretation, source);");
106 _builder.newLine();
107 _builder.append("find mayExist(problem, interpretation, target);");
108 _builder.newLine();
109 }
110 };
111 final StringConcatenationClient commonMayParameterConstraints = _client_2;
112 StringConcatenationClient _client_3 = new StringConcatenationClient() {
113 @Override
114 protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
115 _builder.append("pattern mayInput(");
116 _builder.append(parameters);
117 _builder.append(") {");
118 _builder.newLineIfNotEmpty();
119 _builder.append("\t");
120 _builder.append(commonMayParameterConstraints, "\t");
121 _builder.newLineIfNotEmpty();
122 _builder.append("\t");
123 CharSequence _referInstanceOf = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
124 _builder.append(_referInstanceOf, "\t");
125 _builder.newLineIfNotEmpty();
126 _builder.append("\t");
127 CharSequence _referPattern = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "target", "source" }, Modality.MAY, true, false);
128 _builder.append(_referPattern, "\t");
129 _builder.newLineIfNotEmpty();
130 _builder.append("\t");
131 _builder.append("neg ");
132 CharSequence _referRelation = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "target", "source", Modality.MUST, fqnToPQuery);
133 _builder.append(_referRelation, "\t");
134 _builder.newLineIfNotEmpty();
135 _builder.append("\t");
136 _builder.append("neg ");
137 CharSequence _referRelation_1 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "target", "source", Modality.MUST, fqnToPQuery);
138 _builder.append(_referRelation_1, "\t");
139 _builder.newLineIfNotEmpty();
140 _builder.append("}");
141 _builder.newLine();
142 _builder.newLine();
143 _builder.append("pattern multipleMayInput(problem: LogicProblem, interpretation: PartialInterpretation,");
144 _builder.newLine();
145 _builder.append("\t\t\t");
146 _builder.append("target: DefinedElement) {");
147 _builder.newLine();
148 _builder.append("\t");
149 _builder.append("find interpretation(problem, interpretation);");
150 _builder.newLine();
151 _builder.append("\t");
152 _builder.append("find mustExist(problem, interpretation, target);");
153 _builder.newLine();
154 _builder.append("\t");
155 _builder.append("find mayInput(problem, interpretaton, source1, target);");
156 _builder.newLine();
157 _builder.append("\t");
158 _builder.append("find mayInput(problem, interpretaton, source2, target);");
159 _builder.newLine();
160 _builder.append("\t");
161 _builder.append("neg find mustEquivalent(problem, interpretation, source1, source2);");
162 _builder.newLine();
163 _builder.append("}");
164 _builder.newLine();
165 _builder.newLine();
166 _builder.append("pattern multipleMayStraight(problem: LogicProblem, interpretation: PartialInterpretation,");
167 _builder.newLine();
168 _builder.append("\t\t\t");
169 _builder.append("source: DefinedElement) {");
170 _builder.newLine();
171 _builder.append("\t");
172 _builder.append("find interpretation(problem, interpretation);");
173 _builder.newLine();
174 _builder.append("\t");
175 _builder.append("find mustExist(problem, interpretation, source);");
176 _builder.newLine();
177 _builder.append("\t");
178 CharSequence _referInstanceOf_1 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
179 _builder.append(_referInstanceOf_1, "\t");
180 _builder.newLineIfNotEmpty();
181 _builder.append("\t");
182 CharSequence _referRelation_2 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target1", Modality.MAY, fqnToPQuery);
183 _builder.append(_referRelation_2, "\t");
184 _builder.newLineIfNotEmpty();
185 _builder.append("\t");
186 CharSequence _referRelation_3 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target2", Modality.MAY, fqnToPQuery);
187 _builder.append(_referRelation_3, "\t");
188 _builder.newLineIfNotEmpty();
189 _builder.append("\t");
190 _builder.append("neg find mustEquivalent(problem, interpretation, target1, target2);");
191 _builder.newLine();
192 _builder.append("}");
193 _builder.newLine();
194 _builder.newLine();
195 _builder.append("pattern multipleMayDivergent(problem: LogicProblem, interpretation: PartialInterpretation,");
196 _builder.newLine();
197 _builder.append("\t\t\t");
198 _builder.append("source: DefinedElement) {");
199 _builder.newLine();
200 _builder.append("\t");
201 _builder.append("find interpretation(problem, interpretation);");
202 _builder.newLine();
203 _builder.append("\t");
204 _builder.append("find mustExist(problem, interpretation, source);");
205 _builder.newLine();
206 _builder.append("\t");
207 CharSequence _referInstanceOf_2 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
208 _builder.append(_referInstanceOf_2, "\t");
209 _builder.newLineIfNotEmpty();
210 _builder.append("\t");
211 CharSequence _referRelation_4 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target1", Modality.MAY, fqnToPQuery);
212 _builder.append(_referRelation_4, "\t");
213 _builder.newLineIfNotEmpty();
214 _builder.append("\t");
215 CharSequence _referRelation_5 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target2", Modality.MAY, fqnToPQuery);
216 _builder.append(_referRelation_5, "\t");
217 _builder.newLineIfNotEmpty();
218 _builder.append("\t");
219 _builder.append("neg find mustEquivalent(problem, interpretation, target1, target2);");
220 _builder.newLine();
221 _builder.append("}");
222 _builder.newLine();
223 _builder.newLine();
96 _builder.append("pattern "); 224 _builder.append("pattern ");
97 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO_HELPER); 225 _builder.append(Modes3UnitPropagationGenerator.MUST_CONNECTED_TO);
98 _builder.append("("); 226 _builder.append("(");
99 _builder.append(parameters); 227 _builder.append(parameters);
100 _builder.append(") {"); 228 _builder.append(") {");
101 _builder.newLineIfNotEmpty(); 229 _builder.newLineIfNotEmpty();
102 _builder.append("\t"); 230 _builder.append("\t");
103 _builder.append("// connectedToReflexive unit propagation"); 231 _builder.append(commonMustParameterConstraints, "\t");
232 _builder.newLineIfNotEmpty();
233 _builder.append("\t");
234 CharSequence _referInstanceOf_3 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
235 _builder.append(_referInstanceOf_3, "\t");
236 _builder.newLineIfNotEmpty();
237 _builder.append("\t");
238 _builder.append("find mayInput(problem, interpretaton, source, target);");
239 _builder.newLine();
240 _builder.append("\t");
241 _builder.append("neg find multipleMayInput(problem, interpretaton, target);");
104 _builder.newLine(); 242 _builder.newLine();
105 _builder.append("\t"); 243 _builder.append("\t");
106 _builder.append(commonParameterConstraints, "\t"); 244 CharSequence _referRelation_6 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "target", Modality.MAY, fqnToPQuery);
245 _builder.append(_referRelation_6, "\t");
107 _builder.newLineIfNotEmpty(); 246 _builder.newLineIfNotEmpty();
108 _builder.append("\t"); 247 _builder.append("\t");
109 CharSequence _referInstanceOf = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "source"); 248 _builder.append("neg ");
110 _builder.append(_referInstanceOf, "\t"); 249 CharSequence _referRelation_7 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "target", Modality.MUST, fqnToPQuery);
250 _builder.append(_referRelation_7, "\t");
111 _builder.newLineIfNotEmpty(); 251 _builder.newLineIfNotEmpty();
112 _builder.append("\t"); 252 _builder.append("\t");
113 CharSequence _referInstanceOf_1 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 253 _builder.append("neg ");
114 _builder.append(_referInstanceOf_1, "\t"); 254 CharSequence _referRelation_8 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MAY, fqnToPQuery);
255 _builder.append(_referRelation_8, "\t");
115 _builder.newLineIfNotEmpty(); 256 _builder.newLineIfNotEmpty();
116 _builder.append("\t"); 257 _builder.append("\t");
117 _builder.append("source == target;"); 258 _builder.append("neg ");
259 CharSequence _referRelation_9 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MAY, fqnToPQuery);
260 _builder.append(_referRelation_9, "\t");
261 _builder.newLineIfNotEmpty();
262 _builder.append("}");
118 _builder.newLine(); 263 _builder.newLine();
119 _builder.append("} or {");
120 _builder.newLine(); 264 _builder.newLine();
265 _builder.append("pattern ");
266 _builder.append(Modes3UnitPropagationGenerator.MUST_STRAIGHT);
267 _builder.append("(");
268 _builder.append(parameters);
269 _builder.append(") {");
270 _builder.newLineIfNotEmpty();
271 _builder.append("\t");
272 _builder.append(commonMustParameterConstraints, "\t");
273 _builder.newLineIfNotEmpty();
274 _builder.append("\t");
275 _builder.append("neg ");
276 CharSequence _referRelation_10 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "_", Modality.MUST, fqnToPQuery);
277 _builder.append(_referRelation_10, "\t");
278 _builder.newLineIfNotEmpty();
121 _builder.append("\t"); 279 _builder.append("\t");
122 _builder.append("// tooManyInputsOfSegment unit propagation"); 280 _builder.append("neg find multipleMayStraight(problem, interpretation, source);");
123 _builder.newLine(); 281 _builder.newLine();
124 _builder.append("\t"); 282 _builder.append("\t");
125 _builder.append(commonParameterConstraints, "\t"); 283 CharSequence _referRelation_11 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MAY, fqnToPQuery);
284 _builder.append(_referRelation_11, "\t");
126 _builder.newLineIfNotEmpty(); 285 _builder.newLineIfNotEmpty();
127 _builder.append("\t"); 286 _builder.append("\t");
128 CharSequence _referInstanceOf_2 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "source"); 287 _builder.append("neg ");
129 _builder.append(_referInstanceOf_2, "\t"); 288 CharSequence _referRelation_12 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MUST, fqnToPQuery);
289 _builder.append(_referRelation_12, "\t");
130 _builder.newLineIfNotEmpty(); 290 _builder.newLineIfNotEmpty();
291 _builder.append("} or {");
292 _builder.newLine();
131 _builder.append("\t"); 293 _builder.append("\t");
132 CharSequence _referInstanceOf_3 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 294 _builder.append(commonMustParameterConstraints, "\t");
133 _builder.append(_referInstanceOf_3, "\t");
134 _builder.newLineIfNotEmpty(); 295 _builder.newLineIfNotEmpty();
135 _builder.append("\t"); 296 _builder.append("\t");
136 CharSequence _referInstanceOf_4 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "input1"); 297 CharSequence _referInstanceOf_4 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
137 _builder.append(_referInstanceOf_4, "\t"); 298 _builder.append(_referInstanceOf_4, "\t");
138 _builder.newLineIfNotEmpty(); 299 _builder.newLineIfNotEmpty();
139 _builder.append("\t"); 300 _builder.append("\t");
140 CharSequence _referInstanceOf_5 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "input2"); 301 _builder.append("find mayInput(problem, interpretaton, source, target);");
141 _builder.append(_referInstanceOf_5, "\t"); 302 _builder.newLine();
303 _builder.append("\t");
304 _builder.append("neg find multipleMayInput(problem, interpretaton, target);");
305 _builder.newLine();
306 _builder.append("\t");
307 _builder.append("neg ");
308 CharSequence _referRelation_13 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "target", Modality.MAY, fqnToPQuery);
309 _builder.append(_referRelation_13, "\t");
310 _builder.newLineIfNotEmpty();
311 _builder.append("\t");
312 CharSequence _referRelation_14 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MAY, fqnToPQuery);
313 _builder.append(_referRelation_14, "\t");
142 _builder.newLineIfNotEmpty(); 314 _builder.newLineIfNotEmpty();
143 _builder.append("\t"); 315 _builder.append("\t");
144 _builder.append("neg "); 316 _builder.append("neg ");
145 CharSequence _referInstanceOf_6 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source"); 317 CharSequence _referRelation_15 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MUST, fqnToPQuery);
146 _builder.append(_referInstanceOf_6, "\t"); 318 _builder.append(_referRelation_15, "\t");
147 _builder.newLineIfNotEmpty(); 319 _builder.newLineIfNotEmpty();
148 _builder.append("\t"); 320 _builder.append("\t");
149 CharSequence _referPattern = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "input1", "source" }, Modality.MUST, true, false); 321 _builder.append("neg ");
150 _builder.append(_referPattern, "\t"); 322 CharSequence _referRelation_16 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MAY, fqnToPQuery);
323 _builder.append(_referRelation_16, "\t");
324 _builder.newLineIfNotEmpty();
325 _builder.append("}");
326 _builder.newLine();
327 _builder.newLine();
328 _builder.append("pattern ");
329 _builder.append(Modes3UnitPropagationGenerator.MUST_DIVERGENT);
330 _builder.append("(");
331 _builder.append(parameters);
332 _builder.append(") {");
151 _builder.newLineIfNotEmpty(); 333 _builder.newLineIfNotEmpty();
152 _builder.append("\t"); 334 _builder.append("\t");
153 CharSequence _referPattern_1 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "input2", "source" }, Modality.MUST, true, false); 335 _builder.append(commonMustParameterConstraints, "\t");
154 _builder.append(_referPattern_1, "\t"); 336 _builder.newLineIfNotEmpty();
337 _builder.append("\t");
338 _builder.append("neg ");
339 CharSequence _referRelation_17 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "_", Modality.MUST, fqnToPQuery);
340 _builder.append(_referRelation_17, "\t");
155 _builder.newLineIfNotEmpty(); 341 _builder.newLineIfNotEmpty();
156 _builder.append("\t"); 342 _builder.append("\t");
157 _builder.append("input1 != input2;"); 343 _builder.append("neg find multipleMayDivergent(problem, interpretation, source);");
158 _builder.newLine(); 344 _builder.newLine();
159 _builder.append("\t"); 345 _builder.append("\t");
160 _builder.append("input1 != target;"); 346 CharSequence _referRelation_18 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MAY, fqnToPQuery);
347 _builder.append(_referRelation_18, "\t");
348 _builder.newLineIfNotEmpty();
349 _builder.append("\t");
350 _builder.append("neg ");
351 CharSequence _referRelation_19 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MUST, fqnToPQuery);
352 _builder.append(_referRelation_19, "\t");
353 _builder.newLineIfNotEmpty();
354 _builder.append("} or {");
161 _builder.newLine(); 355 _builder.newLine();
162 _builder.append("\t"); 356 _builder.append("\t");
163 _builder.append("input2 != target;"); 357 _builder.append(commonMustParameterConstraints, "\t");
358 _builder.newLineIfNotEmpty();
359 _builder.append("\t");
360 CharSequence _referInstanceOf_5 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
361 _builder.append(_referInstanceOf_5, "\t");
362 _builder.newLineIfNotEmpty();
363 _builder.append("\t");
364 _builder.append("find mayInput(problem, interpretaton, source, target);");
164 _builder.newLine(); 365 _builder.newLine();
165 _builder.append("} or {"); 366 _builder.append("\t");
367 _builder.append("neg find multipleMayInput(problem, interpretaton, target);");
166 _builder.newLine(); 368 _builder.newLine();
167 _builder.append("\t"); 369 _builder.append("\t");
168 _builder.append("// turnoutConnectedToBothOutputs unit propagation 1"); 370 _builder.append("neg ");
371 CharSequence _referRelation_20 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "target", Modality.MAY, fqnToPQuery);
372 _builder.append(_referRelation_20, "\t");
373 _builder.newLineIfNotEmpty();
374 _builder.append("\t");
375 _builder.append("neg ");
376 CharSequence _referRelation_21 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MAY, fqnToPQuery);
377 _builder.append(_referRelation_21, "\t");
378 _builder.newLineIfNotEmpty();
379 _builder.append("\t");
380 CharSequence _referRelation_22 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MAY, fqnToPQuery);
381 _builder.append(_referRelation_22, "\t");
382 _builder.newLineIfNotEmpty();
383 _builder.append("\t");
384 _builder.append("neg ");
385 CharSequence _referRelation_23 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MUST, fqnToPQuery);
386 _builder.append(_referRelation_23, "\t");
387 _builder.newLineIfNotEmpty();
388 _builder.append("}");
169 _builder.newLine(); 389 _builder.newLine();
390 _builder.newLine();
391 _builder.append("pattern turnoutOutput_must_to_true_by_straight(");
392 _builder.append(parameters);
393 _builder.append(", T : DefinedElement, S : DefinedElement) {");
394 _builder.newLineIfNotEmpty();
170 _builder.append("\t"); 395 _builder.append("\t");
171 _builder.append(commonParameterConstraints, "\t"); 396 _builder.append(commonMayParameterConstraints, "\t");
172 _builder.newLineIfNotEmpty(); 397 _builder.newLineIfNotEmpty();
173 _builder.append("\t"); 398 _builder.append("\t");
174 CharSequence _referInstanceOf_7 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 399 CharSequence _referInstanceOf_6 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
175 _builder.append(_referInstanceOf_7, "\t"); 400 _builder.append(_referInstanceOf_6, "\t");
176 _builder.newLineIfNotEmpty(); 401 _builder.newLineIfNotEmpty();
177 _builder.append("\t"); 402 _builder.append("\t");
178 CharSequence _referInstanceOf_8 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 403 CharSequence _referInstanceOf_7 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
179 _builder.append(_referInstanceOf_8, "\t"); 404 _builder.append(_referInstanceOf_7, "\t");
180 _builder.newLineIfNotEmpty(); 405 _builder.newLineIfNotEmpty();
181 _builder.append("\t"); 406 _builder.append("\t");
182 CharSequence _referInstanceOf_9 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "divergent"); 407 _builder.append("T == source;");
183 _builder.append(_referInstanceOf_9, "\t"); 408 _builder.newLine();
409 _builder.append("\t");
410 _builder.append("S == target;");
411 _builder.newLine();
412 _builder.append("}");
413 _builder.newLine();
414 _builder.newLine();
415 _builder.append("pattern turnoutOutput_must_to_true_by_divergent(");
416 _builder.append(parameters);
417 _builder.append(", T : DefinedElement, S : DefinedElement) {");
184 _builder.newLineIfNotEmpty(); 418 _builder.newLineIfNotEmpty();
185 _builder.append("\t"); 419 _builder.append("\t");
186 CharSequence _referRelation = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MUST, fqnToPQuery); 420 _builder.append(commonMayParameterConstraints, "\t");
187 _builder.append(_referRelation, "\t");
188 _builder.newLineIfNotEmpty(); 421 _builder.newLineIfNotEmpty();
189 _builder.append("\t"); 422 _builder.append("\t");
190 CharSequence _referRelation_1 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "divergent", Modality.MUST, fqnToPQuery); 423 CharSequence _referInstanceOf_8 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
191 _builder.append(_referRelation_1, "\t"); 424 _builder.append(_referInstanceOf_8, "\t");
192 _builder.newLineIfNotEmpty(); 425 _builder.newLineIfNotEmpty();
193 _builder.append("\t"); 426 _builder.append("\t");
194 CharSequence _referRelation_2 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "divergent", Modality.MUST, fqnToPQuery); 427 CharSequence _referInstanceOf_9 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
195 _builder.append(_referRelation_2, "\t"); 428 _builder.append(_referInstanceOf_9, "\t");
196 _builder.newLineIfNotEmpty(); 429 _builder.newLineIfNotEmpty();
197 _builder.append("} or {"); 430 _builder.append("\t");
431 _builder.append("T == source;");
198 _builder.newLine(); 432 _builder.newLine();
199 _builder.append("\t"); 433 _builder.append("\t");
200 _builder.append("// turnoutConnectedToBothOutputs unit propagation 2"); 434 _builder.append("S == target;");
201 _builder.newLine(); 435 _builder.newLine();
436 _builder.append("}");
437 _builder.newLine();
438 _builder.newLine();
439 _builder.append("pattern output_must_to_true_by_connectedTo(");
440 _builder.append(parameters);
441 _builder.append(", S1 : DefinedElement, S2 : DefinedElement) {");
442 _builder.newLineIfNotEmpty();
202 _builder.append("\t"); 443 _builder.append("\t");
203 _builder.append(commonParameterConstraints, "\t"); 444 _builder.append(commonMayParameterConstraints, "\t");
204 _builder.newLineIfNotEmpty(); 445 _builder.newLineIfNotEmpty();
205 _builder.append("\t"); 446 _builder.append("\t");
206 CharSequence _referInstanceOf_10 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 447 CharSequence _referInstanceOf_10 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "source");
207 _builder.append(_referInstanceOf_10, "\t"); 448 _builder.append(_referInstanceOf_10, "\t");
208 _builder.newLineIfNotEmpty(); 449 _builder.newLineIfNotEmpty();
209 _builder.append("\t"); 450 _builder.append("\t");
210 CharSequence _referInstanceOf_11 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 451 CharSequence _referInstanceOf_11 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
211 _builder.append(_referInstanceOf_11, "\t"); 452 _builder.append(_referInstanceOf_11, "\t");
212 _builder.newLineIfNotEmpty(); 453 _builder.newLineIfNotEmpty();
213 _builder.append("\t"); 454 _builder.append("\t");
214 CharSequence _referInstanceOf_12 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "straight"); 455 _builder.append("S1 == source;");
215 _builder.append(_referInstanceOf_12, "\t"); 456 _builder.newLine();
457 _builder.append("\t");
458 _builder.append("S2 == target;");
459 _builder.newLine();
460 _builder.append("}");
461 _builder.newLine();
462 _builder.newLine();
463 _builder.append("pattern output_must_to_true_by_straight(");
464 _builder.append(parameters);
465 _builder.append(", S1 : DefinedElement, S2 : DefinedElement) {");
216 _builder.newLineIfNotEmpty(); 466 _builder.newLineIfNotEmpty();
217 _builder.append("\t"); 467 _builder.append("\t");
218 CharSequence _referRelation_3 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "straight", Modality.MUST, fqnToPQuery); 468 _builder.append("find turnoutOutput_must_to_true_by_straight(problem, interpretation, source, target, S1, S2);");
219 _builder.append(_referRelation_3, "\t"); 469 _builder.newLine();
470 _builder.append("}");
471 _builder.newLine();
472 _builder.newLine();
473 _builder.append("pattern output_must_to_true_by_divergent(");
474 _builder.append(parameters);
475 _builder.append(", S1 : DefinedElement, S2 : DefinedElement) {");
220 _builder.newLineIfNotEmpty(); 476 _builder.newLineIfNotEmpty();
221 _builder.append("\t"); 477 _builder.append("\t");
222 CharSequence _referRelation_4 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MUST, fqnToPQuery); 478 _builder.append("find turnoutOutput_must_to_true_by_divergent(problem, interpretation, source, target, S1, S2);");
223 _builder.append(_referRelation_4, "\t"); 479 _builder.newLine();
480 _builder.append("}");
481 _builder.newLine();
482 _builder.newLine();
483 _builder.append("pattern adjacent_must_to_true_by_connectedTo(");
484 _builder.append(parameters);
485 _builder.append(", S1 : DefinedElement, S2 : DefinedElement) {");
224 _builder.newLineIfNotEmpty(); 486 _builder.newLineIfNotEmpty();
225 _builder.append("\t"); 487 _builder.append("\t");
226 CharSequence _referRelation_5 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "straight", Modality.MUST, fqnToPQuery); 488 _builder.append("find output_must_to_true_by_connectedTo(problem, interpretation, source, target, S1, S2);");
227 _builder.append(_referRelation_5, "\t"); 489 _builder.newLine();
490 _builder.append("}");
491 _builder.newLine();
492 _builder.newLine();
493 _builder.append("pattern adjacent_must_to_true_by_straight(");
494 _builder.append(parameters);
495 _builder.append(", S1 : DefinedElement, S2 : DefinedElement) {");
228 _builder.newLineIfNotEmpty(); 496 _builder.newLineIfNotEmpty();
497 _builder.append("\t");
498 _builder.append("find output_must_to_true_by_straight(problem, interpretation, source, target, S1, S2);");
499 _builder.newLine();
229 _builder.append("} or {"); 500 _builder.append("} or {");
230 _builder.newLine(); 501 _builder.newLine();
231 _builder.append("\t"); 502 _builder.append("\t");
232 _builder.append("// tooManyExtraInputsOfTurnout unit propagation"); 503 _builder.append("find turnoutOutput_must_to_true_by_straight(problem, interpretation, source, target, S2, S1);");
233 _builder.newLine(); 504 _builder.newLine();
234 _builder.append("\t"); 505 _builder.append("}");
235 _builder.append(commonParameterConstraints, "\t"); 506 _builder.newLine();
507 _builder.newLine();
508 _builder.append("pattern adjacent_must_to_true_by_divergent(");
509 _builder.append(parameters);
510 _builder.append(", S1 : DefinedElement, S2 : DefinedElement) {");
236 _builder.newLineIfNotEmpty(); 511 _builder.newLineIfNotEmpty();
237 _builder.append("\t"); 512 _builder.append("\t");
238 CharSequence _referInstanceOf_13 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 513 _builder.append("find output_must_to_true_by_divergent(problem, interpretation, source, target, S1, S2);");
239 _builder.append(_referInstanceOf_13, "\t"); 514 _builder.newLine();
240 _builder.newLineIfNotEmpty(); 515 _builder.append("} or {");
516 _builder.newLine();
241 _builder.append("\t"); 517 _builder.append("\t");
242 CharSequence _referInstanceOf_14 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 518 _builder.append("find turnoutOutput_must_to_true_by_divergent(problem, interpretation, source, target, S2, S1);");
243 _builder.append(_referInstanceOf_14, "\t"); 519 _builder.newLine();
520 _builder.append("}");
521 _builder.newLine();
522 _builder.newLine();
523 _builder.append("pattern connectedToReflexive_must_to_true_by_connectedTo(");
524 _builder.append(parameters);
525 _builder.append(", S : DefinedElement) {");
244 _builder.newLineIfNotEmpty(); 526 _builder.newLineIfNotEmpty();
245 _builder.append("\t"); 527 _builder.append("\t");
246 CharSequence _referInstanceOf_15 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "extraInput"); 528 _builder.append("find mustExist(problem, interpretation, source);");
247 _builder.append(_referInstanceOf_15, "\t"); 529 _builder.newLine();
530 _builder.append("\t");
531 CharSequence _referInstanceOf_12 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "source");
532 _builder.append(_referInstanceOf_12, "\t");
248 _builder.newLineIfNotEmpty(); 533 _builder.newLineIfNotEmpty();
249 _builder.append("\t"); 534 _builder.append("\t");
250 CharSequence _referPattern_2 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(TurnoutOutput.instance().getFullyQualifiedName()), new String[] { "source", "target" }, Modality.MAY, false, false); 535 _builder.append("S == source;");
251 _builder.append(_referPattern_2, "\t"); 536 _builder.newLine();
537 _builder.append("\t");
538 _builder.append("S == target;");
539 _builder.newLine();
540 _builder.append("}");
541 _builder.newLine();
542 _builder.newLine();
543 _builder.append("pattern outputReflexive_must_to_true_by_straight(");
544 _builder.append(parameters);
545 _builder.append(", T : DefinedElement) {");
252 _builder.newLineIfNotEmpty(); 546 _builder.newLineIfNotEmpty();
253 _builder.append("\t"); 547 _builder.append("\t");
254 CharSequence _referPattern_3 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(ExtraInputOfTurnout.instance().getFullyQualifiedName()), new String[] { "source", "extraInput" }, Modality.MUST, true, false); 548 _builder.append("find turnoutOutput_must_to_true_by_straight(problem, interpretation, source, target, T, T);");
255 _builder.append(_referPattern_3, "\t"); 549 _builder.newLine();
550 _builder.append("}");
551 _builder.newLine();
552 _builder.newLine();
553 _builder.append("pattern outputReflexive_must_to_true_by_divergent(");
554 _builder.append(parameters);
555 _builder.append(", T : DefinedElement) {");
256 _builder.newLineIfNotEmpty(); 556 _builder.newLineIfNotEmpty();
257 _builder.append("\t"); 557 _builder.append("\t");
258 _builder.append("target != extraInput;"); 558 _builder.append("find turnoutOutput_must_to_true_by_divergent(problem, interpretation, source, target, T, T);");
259 _builder.newLine(); 559 _builder.newLine();
260 _builder.append("}"); 560 _builder.append("}");
261 _builder.newLine(); 561 _builder.newLine();
262 _builder.newLine(); 562 _builder.newLine();
263 _builder.append("pattern "); 563 _builder.append("pattern turnoutOutputsAreSame_must_to_true_by_straight(");
264 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO);
265 _builder.append("(");
266 _builder.append(parameters); 564 _builder.append(parameters);
267 _builder.append(") {"); 565 _builder.append(", T : DefinedElement) {");
268 _builder.newLineIfNotEmpty(); 566 _builder.newLineIfNotEmpty();
269 _builder.append("\t"); 567 _builder.append("\t");
270 _builder.append("find "); 568 _builder.append(commonMayParameterConstraints, "\t");
271 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO_HELPER, "\t");
272 _builder.append("(problem, interpretation, source, target);");
273 _builder.newLineIfNotEmpty(); 569 _builder.newLineIfNotEmpty();
274 _builder.append("} or {"); 570 _builder.append("\t");
571 CharSequence _referInstanceOf_13 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
572 _builder.append(_referInstanceOf_13, "\t");
573 _builder.newLineIfNotEmpty();
574 _builder.append("\t");
575 CharSequence _referInstanceOf_14 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
576 _builder.append(_referInstanceOf_14, "\t");
577 _builder.newLineIfNotEmpty();
578 _builder.append("\t");
579 _builder.append("T == source;");
275 _builder.newLine(); 580 _builder.newLine();
276 _builder.append("\t"); 581 _builder.append("\t");
277 _builder.append("find "); 582 _builder.append("S == target;");
278 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO_HELPER, "\t"); 583 _builder.newLine();
279 _builder.append("(problem, interpretation, target, source);"); 584 _builder.append("\t");
585 CharSequence _referRelation_24 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "T", "S", Modality.MUST, fqnToPQuery);
586 _builder.append(_referRelation_24, "\t");
280 _builder.newLineIfNotEmpty(); 587 _builder.newLineIfNotEmpty();
281 _builder.append("}"); 588 _builder.append("}");
282 _builder.newLine(); 589 _builder.newLine();
283 _builder.newLine(); 590 _builder.newLine();
284 _builder.append("pattern "); 591 _builder.append("pattern turnoutOutputsAreSame_must_to_true_by_divergent(");
285 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_TURNOUT_OUTPUT);
286 _builder.append("(");
287 _builder.append(parameters); 592 _builder.append(parameters);
288 _builder.append(") {"); 593 _builder.append(", T : DefinedElement) {");
289 _builder.newLineIfNotEmpty(); 594 _builder.newLineIfNotEmpty();
290 _builder.append("\t"); 595 _builder.append("\t");
291 _builder.append("// outputReflexive unit propagation"); 596 _builder.append(commonMayParameterConstraints, "\t");
292 _builder.newLine(); 597 _builder.newLineIfNotEmpty();
293 _builder.append("\t"); 598 _builder.append("\t");
294 _builder.append(commonParameterConstraints, "\t"); 599 CharSequence _referInstanceOf_15 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
600 _builder.append(_referInstanceOf_15, "\t");
295 _builder.newLineIfNotEmpty(); 601 _builder.newLineIfNotEmpty();
296 _builder.append("\t"); 602 _builder.append("\t");
297 CharSequence _referInstanceOf_16 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 603 CharSequence _referInstanceOf_16 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
298 _builder.append(_referInstanceOf_16, "\t"); 604 _builder.append(_referInstanceOf_16, "\t");
299 _builder.newLineIfNotEmpty(); 605 _builder.newLineIfNotEmpty();
300 _builder.append("\t"); 606 _builder.append("\t");
301 CharSequence _referInstanceOf_17 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "target"); 607 _builder.append("T == source;");
608 _builder.newLine();
609 _builder.append("\t");
610 _builder.append("S == target;");
611 _builder.newLine();
612 _builder.append("\t");
613 CharSequence _referRelation_25 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "T", "S", Modality.MUST, fqnToPQuery);
614 _builder.append(_referRelation_25, "\t");
615 _builder.newLineIfNotEmpty();
616 _builder.append("}");
617 _builder.newLine();
618 _builder.newLine();
619 _builder.append("pattern tooManyInputsOfSegment_must_to_true_by_connectedTo(");
620 _builder.append(parameters);
621 _builder.append(", S : DefinedElement) {");
622 _builder.newLineIfNotEmpty();
623 _builder.append("\t");
624 _builder.append("find mustExist(problem, interpretation, S);");
625 _builder.newLine();
626 _builder.append("\t");
627 CharSequence _referInstanceOf_17 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.simpleSegmentType, Modality.MUST, "S");
302 _builder.append(_referInstanceOf_17, "\t"); 628 _builder.append(_referInstanceOf_17, "\t");
303 _builder.newLineIfNotEmpty(); 629 _builder.newLineIfNotEmpty();
304 _builder.append("\t"); 630 _builder.append("\t");
305 _builder.append("source == target;"); 631 _builder.append("find output_must_to_true_by_connectedTo(problem, interpretation, source, target, I1, S);");
306 _builder.newLine(); 632 _builder.newLine();
307 _builder.append("} or {"); 633 _builder.append("\t");
634 CharSequence _referPattern_1 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "I2", "S" }, Modality.MUST, true, false);
635 _builder.append(_referPattern_1, "\t");
636 _builder.newLineIfNotEmpty();
637 _builder.append("\t");
638 CharSequence _referPattern_2 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "I3", "S" }, Modality.MUST, true, false);
639 _builder.append(_referPattern_2, "\t");
640 _builder.newLineIfNotEmpty();
641 _builder.append("\t");
642 _builder.append("I1 != I2;");
308 _builder.newLine(); 643 _builder.newLine();
309 _builder.append("\t"); 644 _builder.append("\t");
310 _builder.append("// tooManyInputsOfSegment unit propagation"); 645 _builder.append("I1 != I3;");
311 _builder.newLine(); 646 _builder.newLine();
312 _builder.append("\t"); 647 _builder.append("\t");
313 _builder.append(commonParameterConstraints, "\t"); 648 _builder.append("I2 != I3;");
649 _builder.newLine();
650 _builder.append("}");
651 _builder.newLine();
652 _builder.newLine();
653 _builder.append("pattern tooManyInputsOfSegment_must_to_true_by_straight(");
654 _builder.append(parameters);
655 _builder.append(", S : DefinedElement) {");
314 _builder.newLineIfNotEmpty(); 656 _builder.newLineIfNotEmpty();
315 _builder.append("\t"); 657 _builder.append("\t");
316 CharSequence _referInstanceOf_18 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 658 _builder.append("find mustExist(problem, interpretation, S);");
659 _builder.newLine();
660 _builder.append("\t");
661 CharSequence _referInstanceOf_18 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.simpleSegmentType, Modality.MUST, "S");
317 _builder.append(_referInstanceOf_18, "\t"); 662 _builder.append(_referInstanceOf_18, "\t");
318 _builder.newLineIfNotEmpty(); 663 _builder.newLineIfNotEmpty();
319 _builder.append("\t"); 664 _builder.append("\t");
320 CharSequence _referInstanceOf_19 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 665 _builder.append("find output_must_to_true_by_straight(problem, interpretation, source, target, I1, S);");
321 _builder.append(_referInstanceOf_19, "\t"); 666 _builder.newLine();
322 _builder.newLineIfNotEmpty();
323 _builder.append("\t"); 667 _builder.append("\t");
324 CharSequence _referInstanceOf_20 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "input1"); 668 CharSequence _referPattern_3 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "I2", "S" }, Modality.MUST, true, false);
325 _builder.append(_referInstanceOf_20, "\t"); 669 _builder.append(_referPattern_3, "\t");
326 _builder.newLineIfNotEmpty(); 670 _builder.newLineIfNotEmpty();
327 _builder.append("\t"); 671 _builder.append("\t");
328 CharSequence _referInstanceOf_21 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "input2"); 672 CharSequence _referPattern_4 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "I3", "S" }, Modality.MUST, true, false);
329 _builder.append(_referInstanceOf_21, "\t"); 673 _builder.append(_referPattern_4, "\t");
330 _builder.newLineIfNotEmpty(); 674 _builder.newLineIfNotEmpty();
331 _builder.append("\t"); 675 _builder.append("\t");
332 _builder.append("neg "); 676 _builder.append("I1 != I2;");
333 CharSequence _referInstanceOf_22 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "target"); 677 _builder.newLine();
334 _builder.append(_referInstanceOf_22, "\t"); 678 _builder.append("\t");
679 _builder.append("I1 != I3;");
680 _builder.newLine();
681 _builder.append("\t");
682 _builder.append("I2 != I3;");
683 _builder.newLine();
684 _builder.append("}");
685 _builder.newLine();
686 _builder.newLine();
687 _builder.append("pattern tooManyInputsOfSegment_must_to_true_by_divergent(");
688 _builder.append(parameters);
689 _builder.append(", S : DefinedElement) {");
335 _builder.newLineIfNotEmpty(); 690 _builder.newLineIfNotEmpty();
336 _builder.append("\t"); 691 _builder.append("\t");
337 CharSequence _referPattern_4 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "input1", "target" }, Modality.MUST, true, false); 692 _builder.append("find mustExist(problem, interpretation, S);");
338 _builder.append(_referPattern_4, "\t"); 693 _builder.newLine();
694 _builder.append("\t");
695 CharSequence _referInstanceOf_19 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.simpleSegmentType, Modality.MUST, "S");
696 _builder.append(_referInstanceOf_19, "\t");
339 _builder.newLineIfNotEmpty(); 697 _builder.newLineIfNotEmpty();
340 _builder.append("\t"); 698 _builder.append("\t");
341 CharSequence _referPattern_5 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "input2", "target" }, Modality.MUST, true, false); 699 _builder.append("find output_must_to_true_by_divergent(problem, interpretation, source, target, I1, S);");
700 _builder.newLine();
701 _builder.append("\t");
702 CharSequence _referPattern_5 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "I2", "S" }, Modality.MUST, true, false);
342 _builder.append(_referPattern_5, "\t"); 703 _builder.append(_referPattern_5, "\t");
343 _builder.newLineIfNotEmpty(); 704 _builder.newLineIfNotEmpty();
344 _builder.append("\t"); 705 _builder.append("\t");
345 _builder.append("input1 != input2;"); 706 CharSequence _referPattern_6 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Output.instance().getFullyQualifiedName()), new String[] { "I3", "S" }, Modality.MUST, true, false);
707 _builder.append(_referPattern_6, "\t");
708 _builder.newLineIfNotEmpty();
709 _builder.append("\t");
710 _builder.append("I1 != I2;");
346 _builder.newLine(); 711 _builder.newLine();
347 _builder.append("\t"); 712 _builder.append("\t");
348 _builder.append("input1 != source;"); 713 _builder.append("I1 != I3;");
349 _builder.newLine(); 714 _builder.newLine();
350 _builder.append("\t"); 715 _builder.append("\t");
351 _builder.append("input2 != source;"); 716 _builder.append("I2 != I3;");
352 _builder.newLine(); 717 _builder.newLine();
353 _builder.append("}"); 718 _builder.append("}");
354 _builder.newLine(); 719 _builder.newLine();
355 _builder.newLine(); 720 _builder.newLine();
356 _builder.append("pattern "); 721 _builder.append("pattern turnoutConnectedToBothOutputs_must_to_true_by_connectedTo(");
357 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_STRAIGHT);
358 _builder.append("(");
359 _builder.append(parameters); 722 _builder.append(parameters);
360 _builder.append(") {"); 723 _builder.append(", T : DefinedElement) {");
361 _builder.newLineIfNotEmpty(); 724 _builder.newLineIfNotEmpty();
362 _builder.append("\t"); 725 _builder.append("\t");
363 _builder.append("find "); 726 _builder.append(commonMayParameterConstraints, "\t");
364 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_TURNOUT_OUTPUT, "\t");
365 _builder.append("(problem, interpretation, source, target);");
366 _builder.newLineIfNotEmpty(); 727 _builder.newLineIfNotEmpty();
367 _builder.append("} or {"); 728 _builder.append("\t");
729 _builder.append("find mustExist(problem, interpretation, Straight);");
368 _builder.newLine(); 730 _builder.newLine();
369 _builder.append("\t"); 731 _builder.append("\t");
370 _builder.append("// turnoutOutputsAreSame unit propagation"); 732 _builder.append("find mustExist(problem, interpretation, Divergent);");
371 _builder.newLine(); 733 _builder.newLine();
372 _builder.append("\t"); 734 _builder.append("\t");
373 _builder.append(commonParameterConstraints, "\t"); 735 CharSequence _referInstanceOf_20 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
736 _builder.append(_referInstanceOf_20, "\t");
737 _builder.newLineIfNotEmpty();
738 _builder.append("\t");
739 CharSequence _referInstanceOf_21 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
740 _builder.append(_referInstanceOf_21, "\t");
374 _builder.newLineIfNotEmpty(); 741 _builder.newLineIfNotEmpty();
375 _builder.append("\t"); 742 _builder.append("\t");
376 CharSequence _referInstanceOf_23 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 743 CharSequence _referInstanceOf_22 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Straight");
744 _builder.append(_referInstanceOf_22, "\t");
745 _builder.newLineIfNotEmpty();
746 _builder.append("\t");
747 CharSequence _referInstanceOf_23 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Divergent");
377 _builder.append(_referInstanceOf_23, "\t"); 748 _builder.append(_referInstanceOf_23, "\t");
378 _builder.newLineIfNotEmpty(); 749 _builder.newLineIfNotEmpty();
379 _builder.append("\t"); 750 _builder.append("\t");
380 CharSequence _referInstanceOf_24 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 751 CharSequence _referRelation_26 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "T", "Straight", Modality.MUST, fqnToPQuery);
381 _builder.append(_referInstanceOf_24, "\t"); 752 _builder.append(_referRelation_26, "\t");
382 _builder.newLineIfNotEmpty(); 753 _builder.newLineIfNotEmpty();
383 _builder.append("\t"); 754 _builder.append("\t");
384 CharSequence _referRelation_6 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "target", Modality.MUST, fqnToPQuery); 755 CharSequence _referRelation_27 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "T", "Divergent", Modality.MUST, fqnToPQuery);
385 _builder.append(_referRelation_6, "\t"); 756 _builder.append(_referRelation_27, "\t");
757 _builder.newLineIfNotEmpty();
758 _builder.append("\t");
759 _builder.append("T == source;");
760 _builder.newLine();
761 _builder.append("\t");
762 _builder.append("Straight == target;");
763 _builder.newLine();
764 _builder.append("\t");
765 CharSequence _referRelation_28 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "T", "Divergent", Modality.MUST, fqnToPQuery);
766 _builder.append(_referRelation_28, "\t");
386 _builder.newLineIfNotEmpty(); 767 _builder.newLineIfNotEmpty();
387 _builder.append("} or {"); 768 _builder.append("} or {");
388 _builder.newLine(); 769 _builder.newLine();
389 _builder.append("\t"); 770 _builder.append("\t");
390 _builder.append("// turnoutConnectedToBothOutputs unit propagation"); 771 _builder.append(commonMayParameterConstraints, "\t");
772 _builder.newLineIfNotEmpty();
773 _builder.append("\t");
774 _builder.append("find mustExist(problem, interpretation, Straight);");
775 _builder.newLine();
776 _builder.append("\t");
777 _builder.append("find mustExist(problem, interpretation, Divergent);");
391 _builder.newLine(); 778 _builder.newLine();
392 _builder.append("\t"); 779 _builder.append("\t");
393 _builder.append(commonParameterConstraints, "\t"); 780 CharSequence _referInstanceOf_24 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
781 _builder.append(_referInstanceOf_24, "\t");
394 _builder.newLineIfNotEmpty(); 782 _builder.newLineIfNotEmpty();
395 _builder.append("\t"); 783 _builder.append("\t");
396 CharSequence _referInstanceOf_25 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 784 CharSequence _referInstanceOf_25 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
397 _builder.append(_referInstanceOf_25, "\t"); 785 _builder.append(_referInstanceOf_25, "\t");
398 _builder.newLineIfNotEmpty(); 786 _builder.newLineIfNotEmpty();
399 _builder.append("\t"); 787 _builder.append("\t");
400 CharSequence _referInstanceOf_26 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 788 CharSequence _referInstanceOf_26 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Straight");
401 _builder.append(_referInstanceOf_26, "\t"); 789 _builder.append(_referInstanceOf_26, "\t");
402 _builder.newLineIfNotEmpty(); 790 _builder.newLineIfNotEmpty();
403 _builder.append("\t"); 791 _builder.append("\t");
404 CharSequence _referInstanceOf_27 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "divergent"); 792 CharSequence _referInstanceOf_27 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Divergent");
405 _builder.append(_referInstanceOf_27, "\t"); 793 _builder.append(_referInstanceOf_27, "\t");
406 _builder.newLineIfNotEmpty(); 794 _builder.newLineIfNotEmpty();
407 _builder.append("\t"); 795 _builder.append("\t");
408 CharSequence _referRelation_7 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "target", Modality.MUST, fqnToPQuery); 796 CharSequence _referRelation_29 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "T", "Straight", Modality.MUST, fqnToPQuery);
409 _builder.append(_referRelation_7, "\t"); 797 _builder.append(_referRelation_29, "\t");
410 _builder.newLineIfNotEmpty(); 798 _builder.newLineIfNotEmpty();
411 _builder.append("\t"); 799 _builder.append("\t");
412 CharSequence _referRelation_8 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "divergent", Modality.MUST, fqnToPQuery); 800 CharSequence _referRelation_30 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "T", "Divergent", Modality.MUST, fqnToPQuery);
413 _builder.append(_referRelation_8, "\t"); 801 _builder.append(_referRelation_30, "\t");
414 _builder.newLineIfNotEmpty(); 802 _builder.newLineIfNotEmpty();
415 _builder.append("\t"); 803 _builder.append("\t");
416 CharSequence _referRelation_9 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "divergent", Modality.MUST, fqnToPQuery); 804 CharSequence _referRelation_31 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "T", "Straight", Modality.MUST, fqnToPQuery);
417 _builder.append(_referRelation_9, "\t"); 805 _builder.append(_referRelation_31, "\t");
418 _builder.newLineIfNotEmpty(); 806 _builder.newLineIfNotEmpty();
419 _builder.append("} or {"); 807 _builder.append("\t");
808 _builder.append("T == source;");
420 _builder.newLine(); 809 _builder.newLine();
421 _builder.append("\t"); 810 _builder.append("\t");
422 _builder.append("// tooManyExtraInputsOfTurnout unit propagation"); 811 _builder.append("Straight == target;");
812 _builder.newLine();
813 _builder.append("}");
423 _builder.newLine(); 814 _builder.newLine();
815 _builder.newLine();
816 _builder.append("pattern turnoutConnectedToBothOutputs_must_to_true_by_straight(");
817 _builder.append(parameters);
818 _builder.append(", T : DefinedElement) {");
819 _builder.newLineIfNotEmpty();
424 _builder.append("\t"); 820 _builder.append("\t");
425 _builder.append(commonParameterConstraints, "\t"); 821 _builder.append(commonMayParameterConstraints, "\t");
426 _builder.newLineIfNotEmpty(); 822 _builder.newLineIfNotEmpty();
427 _builder.append("\t"); 823 _builder.append("\t");
428 CharSequence _referInstanceOf_28 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 824 _builder.append("find mustExist(problem, interpretation, Straight);");
825 _builder.newLine();
826 _builder.append("\t");
827 _builder.append("find mustExist(problem, interpretation, Divergent);");
828 _builder.newLine();
829 _builder.append("\t");
830 CharSequence _referInstanceOf_28 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
429 _builder.append(_referInstanceOf_28, "\t"); 831 _builder.append(_referInstanceOf_28, "\t");
430 _builder.newLineIfNotEmpty(); 832 _builder.newLineIfNotEmpty();
431 _builder.append("\t"); 833 _builder.append("\t");
432 CharSequence _referInstanceOf_29 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 834 CharSequence _referInstanceOf_29 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
433 _builder.append(_referInstanceOf_29, "\t"); 835 _builder.append(_referInstanceOf_29, "\t");
434 _builder.newLineIfNotEmpty(); 836 _builder.newLineIfNotEmpty();
435 _builder.append("\t"); 837 _builder.append("\t");
436 CharSequence _referInstanceOf_30 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "extraInput"); 838 CharSequence _referInstanceOf_30 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Straight");
437 _builder.append(_referInstanceOf_30, "\t"); 839 _builder.append(_referInstanceOf_30, "\t");
438 _builder.newLineIfNotEmpty(); 840 _builder.newLineIfNotEmpty();
439 _builder.append("\t"); 841 _builder.append("\t");
440 CharSequence _referInstanceOf_31 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "potentialExtraInput"); 842 CharSequence _referInstanceOf_31 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Divergent");
441 _builder.append(_referInstanceOf_31, "\t"); 843 _builder.append(_referInstanceOf_31, "\t");
442 _builder.newLineIfNotEmpty(); 844 _builder.newLineIfNotEmpty();
443 _builder.append("\t"); 845 _builder.append("\t");
444 CharSequence _referPattern_6 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(ExtraInputOfTurnout.instance().getFullyQualifiedName()), new String[] { "source", "extraInput" }, Modality.MUST, true, false); 846 _builder.append("T == source;");
445 _builder.append(_referPattern_6, "\t"); 847 _builder.newLine();
848 _builder.append("\t");
849 _builder.append("Straight == target;");
850 _builder.newLine();
851 _builder.append("\t");
852 CharSequence _referRelation_32 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "T", "Divergent", Modality.MUST, fqnToPQuery);
853 _builder.append(_referRelation_32, "\t");
446 _builder.newLineIfNotEmpty(); 854 _builder.newLineIfNotEmpty();
447 _builder.append("\t"); 855 _builder.append("\t");
448 CharSequence _referRelation_10 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "potentialExtraInput", Modality.MUST, fqnToPQuery); 856 CharSequence _referRelation_33 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "T", "Straight", Modality.MUST, fqnToPQuery);
449 _builder.append(_referRelation_10, "\t"); 857 _builder.append(_referRelation_33, "\t");
450 _builder.newLineIfNotEmpty(); 858 _builder.newLineIfNotEmpty();
451 _builder.append("\t"); 859 _builder.append("\t");
452 _builder.append("neg "); 860 CharSequence _referRelation_34 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "T", "Divergent", Modality.MUST, fqnToPQuery);
453 CharSequence _referRelation_11 = generator.referRelation(Modes3UnitPropagationGenerator.this.divergentRelation, "source", "potentialExtraInput", Modality.MAY, fqnToPQuery); 861 _builder.append(_referRelation_34, "\t");
454 _builder.append(_referRelation_11, "\t"); 862 _builder.newLineIfNotEmpty();
863 _builder.append("}");
864 _builder.newLine();
865 _builder.newLine();
866 _builder.append("pattern turnoutConnectedToBothOutputs_must_to_true_by_divergent(");
867 _builder.append(parameters);
868 _builder.append(", T : DefinedElement) {");
869 _builder.newLineIfNotEmpty();
870 _builder.append("\t");
871 _builder.append(commonMayParameterConstraints, "\t");
455 _builder.newLineIfNotEmpty(); 872 _builder.newLineIfNotEmpty();
456 _builder.append("\t"); 873 _builder.append("\t");
457 _builder.append("extraInput != potentialExtraInput;"); 874 _builder.append("find mustExist(problem, interpretation, Straight);");
458 _builder.newLine(); 875 _builder.newLine();
459 _builder.append("\t"); 876 _builder.append("\t");
460 _builder.append("extraInput != target;"); 877 _builder.append("find mustExist(problem, interpretation, Divergent);");
878 _builder.newLine();
879 _builder.append("\t");
880 CharSequence _referInstanceOf_32 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MAY, "source");
881 _builder.append(_referInstanceOf_32, "\t");
882 _builder.newLineIfNotEmpty();
883 _builder.append("\t");
884 CharSequence _referInstanceOf_33 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MAY, "target");
885 _builder.append(_referInstanceOf_33, "\t");
886 _builder.newLineIfNotEmpty();
887 _builder.append("\t");
888 CharSequence _referInstanceOf_34 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Straight");
889 _builder.append(_referInstanceOf_34, "\t");
890 _builder.newLineIfNotEmpty();
891 _builder.append("\t");
892 CharSequence _referInstanceOf_35 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "Divergent");
893 _builder.append(_referInstanceOf_35, "\t");
894 _builder.newLineIfNotEmpty();
895 _builder.append("\t");
896 CharSequence _referRelation_35 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "T", "Straight", Modality.MUST, fqnToPQuery);
897 _builder.append(_referRelation_35, "\t");
898 _builder.newLineIfNotEmpty();
899 _builder.append("\t");
900 _builder.append("T == source;");
461 _builder.newLine(); 901 _builder.newLine();
462 _builder.append("\t"); 902 _builder.append("\t");
463 _builder.append("potentialExtraInput != target;"); 903 _builder.append("Divergent == target;");
464 _builder.newLine(); 904 _builder.newLine();
905 _builder.append("\t");
906 CharSequence _referRelation_36 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "T", "Straight", Modality.MUST, fqnToPQuery);
907 _builder.append(_referRelation_36, "\t");
908 _builder.newLineIfNotEmpty();
909 _builder.append("\t");
910 CharSequence _referRelation_37 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "T", "Divergent", Modality.MUST, fqnToPQuery);
911 _builder.append(_referRelation_37, "\t");
912 _builder.newLineIfNotEmpty();
465 _builder.append("}"); 913 _builder.append("}");
466 _builder.newLine(); 914 _builder.newLine();
467 _builder.newLine(); 915 _builder.newLine();
468 _builder.append("pattern "); 916 _builder.append("pattern tooManyInputsOfTurnout_must_to_true_by_connectedTo(");
469 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_DIVERGENT);
470 _builder.append("(");
471 _builder.append(parameters); 917 _builder.append(parameters);
472 _builder.append(") {"); 918 _builder.append(", T : DefinedElement) {");
473 _builder.newLineIfNotEmpty(); 919 _builder.newLineIfNotEmpty();
474 _builder.append("\t"); 920 _builder.append("\t");
475 _builder.append("find "); 921 _builder.append("find mustExist(problem, interpretation, S);");
476 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_TURNOUT_OUTPUT, "\t");
477 _builder.append("(problem, interpretation, source, target);");
478 _builder.newLineIfNotEmpty();
479 _builder.append("} or {");
480 _builder.newLine(); 922 _builder.newLine();
481 _builder.append("\t"); 923 _builder.append("\t");
482 _builder.append("// turnoutOutputsAreSame unit propagation"); 924 CharSequence _referInstanceOf_36 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "S");
925 _builder.append(_referInstanceOf_36, "\t");
926 _builder.newLineIfNotEmpty();
927 _builder.append("\t");
928 _builder.append("find adjacent_must_to_true_by_connectedTo(problem, interpretation, source, target, I1, S);");
483 _builder.newLine(); 929 _builder.newLine();
484 _builder.append("\t"); 930 _builder.append("\t");
485 _builder.append(commonParameterConstraints, "\t"); 931 CharSequence _referPattern_7 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I2", "S" }, Modality.MUST, true, false);
932 _builder.append(_referPattern_7, "\t");
486 _builder.newLineIfNotEmpty(); 933 _builder.newLineIfNotEmpty();
487 _builder.append("\t"); 934 _builder.append("\t");
488 CharSequence _referInstanceOf_32 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 935 CharSequence _referPattern_8 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I3", "S" }, Modality.MUST, true, false);
489 _builder.append(_referInstanceOf_32, "\t"); 936 _builder.append(_referPattern_8, "\t");
490 _builder.newLineIfNotEmpty(); 937 _builder.newLineIfNotEmpty();
491 _builder.append("\t"); 938 _builder.append("\t");
492 CharSequence _referInstanceOf_33 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 939 CharSequence _referPattern_9 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I4", "S" }, Modality.MUST, true, false);
493 _builder.append(_referInstanceOf_33, "\t"); 940 _builder.append(_referPattern_9, "\t");
494 _builder.newLineIfNotEmpty(); 941 _builder.newLineIfNotEmpty();
495 _builder.append("\t"); 942 _builder.append("\t");
496 CharSequence _referRelation_12 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "target", Modality.MUST, fqnToPQuery); 943 _builder.append("I1 != I2;");
497 _builder.append(_referRelation_12, "\t");
498 _builder.newLineIfNotEmpty();
499 _builder.append("} or {");
500 _builder.newLine(); 944 _builder.newLine();
501 _builder.append("\t"); 945 _builder.append("\t");
502 _builder.append("// turnoutConnectedToBothOutputs unit propagation"); 946 _builder.append("I1 != I3;");
503 _builder.newLine(); 947 _builder.newLine();
504 _builder.append("\t"); 948 _builder.append("\t");
505 _builder.append(commonParameterConstraints, "\t"); 949 _builder.append("I1 != I4;");
506 _builder.newLineIfNotEmpty(); 950 _builder.newLine();
507 _builder.append("\t"); 951 _builder.append("\t");
508 CharSequence _referInstanceOf_34 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 952 _builder.append("I2 != I3;");
509 _builder.append(_referInstanceOf_34, "\t"); 953 _builder.newLine();
954 _builder.append("\t");
955 _builder.append("I2 != I4;");
956 _builder.newLine();
957 _builder.append("\t");
958 _builder.append("I3 != I4;");
959 _builder.newLine();
960 _builder.append("}");
961 _builder.newLine();
962 _builder.newLine();
963 _builder.append("pattern tooManyInputsOfTurnout_must_to_true_by_straight(");
964 _builder.append(parameters);
965 _builder.append(", T : DefinedElement) {");
510 _builder.newLineIfNotEmpty(); 966 _builder.newLineIfNotEmpty();
511 _builder.append("\t"); 967 _builder.append("\t");
512 CharSequence _referInstanceOf_35 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 968 _builder.append("find mustExist(problem, interpretation, S);");
513 _builder.append(_referInstanceOf_35, "\t"); 969 _builder.newLine();
970 _builder.append("\t");
971 CharSequence _referInstanceOf_37 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "S");
972 _builder.append(_referInstanceOf_37, "\t");
514 _builder.newLineIfNotEmpty(); 973 _builder.newLineIfNotEmpty();
515 _builder.append("\t"); 974 _builder.append("\t");
516 CharSequence _referInstanceOf_36 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "straight"); 975 _builder.append("find adjacent_must_to_true_by_straight(problem, interpretation, source, target, I1, S);");
517 _builder.append(_referInstanceOf_36, "\t"); 976 _builder.newLine();
977 _builder.append("\t");
978 CharSequence _referPattern_10 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I2", "S" }, Modality.MUST, true, false);
979 _builder.append(_referPattern_10, "\t");
518 _builder.newLineIfNotEmpty(); 980 _builder.newLineIfNotEmpty();
519 _builder.append("\t"); 981 _builder.append("\t");
520 CharSequence _referRelation_13 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "target", Modality.MUST, fqnToPQuery); 982 CharSequence _referPattern_11 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I3", "S" }, Modality.MUST, true, false);
521 _builder.append(_referRelation_13, "\t"); 983 _builder.append(_referPattern_11, "\t");
522 _builder.newLineIfNotEmpty(); 984 _builder.newLineIfNotEmpty();
523 _builder.append("\t"); 985 _builder.append("\t");
524 CharSequence _referRelation_14 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "straight", Modality.MUST, fqnToPQuery); 986 CharSequence _referPattern_12 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I4", "S" }, Modality.MUST, true, false);
525 _builder.append(_referRelation_14, "\t"); 987 _builder.append(_referPattern_12, "\t");
526 _builder.newLineIfNotEmpty(); 988 _builder.newLineIfNotEmpty();
527 _builder.append("\t"); 989 _builder.append("\t");
528 CharSequence _referRelation_15 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "straight", Modality.MUST, fqnToPQuery); 990 _builder.append("I1 != I2;");
529 _builder.append(_referRelation_15, "\t"); 991 _builder.newLine();
992 _builder.append("\t");
993 _builder.append("I1 != I3;");
994 _builder.newLine();
995 _builder.append("\t");
996 _builder.append("I1 != I4;");
997 _builder.newLine();
998 _builder.append("\t");
999 _builder.append("I2 != I3;");
1000 _builder.newLine();
1001 _builder.append("\t");
1002 _builder.append("I2 != I4;");
1003 _builder.newLine();
1004 _builder.append("\t");
1005 _builder.append("I3 != I4;");
1006 _builder.newLine();
1007 _builder.append("}");
1008 _builder.newLine();
1009 _builder.newLine();
1010 _builder.append("pattern tooManyInputsOfTurnout_must_to_true_by_divergent(");
1011 _builder.append(parameters);
1012 _builder.append(", T : DefinedElement) {");
530 _builder.newLineIfNotEmpty(); 1013 _builder.newLineIfNotEmpty();
531 _builder.append("} or {"); 1014 _builder.append("\t");
1015 _builder.append("find mustExist(problem, interpretation, S);");
532 _builder.newLine(); 1016 _builder.newLine();
533 _builder.append("\t"); 1017 _builder.append("\t");
534 _builder.append("// tooManyExtraInputsOfTurnout unit propagation"); 1018 CharSequence _referInstanceOf_38 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "S");
1019 _builder.append(_referInstanceOf_38, "\t");
1020 _builder.newLineIfNotEmpty();
1021 _builder.append("\t");
1022 _builder.append("find adjacent_must_to_true_by_divergent(problem, interpretation, source, target, I1, S);");
535 _builder.newLine(); 1023 _builder.newLine();
536 _builder.append("\t"); 1024 _builder.append("\t");
537 _builder.append(commonParameterConstraints, "\t"); 1025 CharSequence _referPattern_13 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I2", "S" }, Modality.MUST, true, false);
1026 _builder.append(_referPattern_13, "\t");
538 _builder.newLineIfNotEmpty(); 1027 _builder.newLineIfNotEmpty();
539 _builder.append("\t"); 1028 _builder.append("\t");
540 CharSequence _referInstanceOf_37 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.turnoutType, Modality.MUST, "source"); 1029 CharSequence _referPattern_14 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I3", "S" }, Modality.MUST, true, false);
541 _builder.append(_referInstanceOf_37, "\t"); 1030 _builder.append(_referPattern_14, "\t");
542 _builder.newLineIfNotEmpty(); 1031 _builder.newLineIfNotEmpty();
543 _builder.append("\t"); 1032 _builder.append("\t");
544 CharSequence _referInstanceOf_38 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "target"); 1033 CharSequence _referPattern_15 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(Adjacent.instance().getFullyQualifiedName()), new String[] { "I4", "S" }, Modality.MUST, true, false);
545 _builder.append(_referInstanceOf_38, "\t"); 1034 _builder.append(_referPattern_15, "\t");
546 _builder.newLineIfNotEmpty(); 1035 _builder.newLineIfNotEmpty();
547 _builder.append("\t"); 1036 _builder.append("\t");
548 CharSequence _referInstanceOf_39 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "extraInput"); 1037 _builder.append("I1 != I2;");
549 _builder.append(_referInstanceOf_39, "\t"); 1038 _builder.newLine();
1039 _builder.append("\t");
1040 _builder.append("I1 != I3;");
1041 _builder.newLine();
1042 _builder.append("\t");
1043 _builder.append("I1 != I4;");
1044 _builder.newLine();
1045 _builder.append("\t");
1046 _builder.append("I2 != I3;");
1047 _builder.newLine();
1048 _builder.append("\t");
1049 _builder.append("I2 != I4;");
1050 _builder.newLine();
1051 _builder.append("\t");
1052 _builder.append("I3 != I4;");
1053 _builder.newLine();
1054 _builder.append("}");
1055 _builder.newLine();
1056 _builder.newLine();
1057 _builder.append("pattern ");
1058 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO);
1059 _builder.append("_helper(");
1060 _builder.append(parameters);
1061 _builder.append(") {");
550 _builder.newLineIfNotEmpty(); 1062 _builder.newLineIfNotEmpty();
551 _builder.append("\t"); 1063 _builder.append("\t");
552 CharSequence _referInstanceOf_40 = generator.getTypeIndexer().referInstanceOf(Modes3UnitPropagationGenerator.this.segmentType, Modality.MUST, "potentialExtraInput"); 1064 _builder.append("find connectedToReflexive_must_to_true_by_connectedTo(problem, interpretation, source, target, _);");
553 _builder.append(_referInstanceOf_40, "\t"); 1065 _builder.newLine();
1066 _builder.append("} or {");
1067 _builder.newLine();
1068 _builder.append("\t");
1069 _builder.append("find tooManyInputsOfSegment_must_to_true_by_connectedTo(problem, interpretation, source, target, _);");
1070 _builder.newLine();
1071 _builder.append("} or {");
1072 _builder.newLine();
1073 _builder.append("\t");
1074 _builder.append("find turnoutConnectedToBothOutputs_must_to_true_by_connectedTo(problem, interpretation, source, target, _);");
1075 _builder.newLine();
1076 _builder.append("} or {");
1077 _builder.newLine();
1078 _builder.append("\t");
1079 _builder.append("find tooManyInputsOfTurnout_must_to_true_by_connectedTo(problem, interpretation, source, target, _);");
1080 _builder.newLine();
1081 _builder.append("}");
1082 _builder.newLine();
1083 _builder.newLine();
1084 _builder.append("pattern ");
1085 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO);
1086 _builder.append("(");
1087 _builder.append(parameters);
1088 _builder.append(") {");
554 _builder.newLineIfNotEmpty(); 1089 _builder.newLineIfNotEmpty();
555 _builder.append("\t"); 1090 _builder.append("\t");
556 CharSequence _referPattern_7 = generator.getRelationDefinitionIndexer().referPattern(fqnToPQuery.get(ExtraInputOfTurnout.instance().getFullyQualifiedName()), new String[] { "source", "extraInput" }, Modality.MUST, true, false); 1091 _builder.append("find ");
557 _builder.append(_referPattern_7, "\t"); 1092 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO, "\t");
1093 _builder.append("_helper(problem, interpretation, source, target);");
558 _builder.newLineIfNotEmpty(); 1094 _builder.newLineIfNotEmpty();
1095 _builder.append("} or {");
1096 _builder.newLine();
559 _builder.append("\t"); 1097 _builder.append("\t");
560 CharSequence _referRelation_16 = generator.referRelation(Modes3UnitPropagationGenerator.this.connectedToRelation, "source", "potentialExtraInput", Modality.MUST, fqnToPQuery); 1098 _builder.append("find ");
561 _builder.append(_referRelation_16, "\t"); 1099 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_CONNECTED_TO, "\t");
1100 _builder.append("_helper(problem, interpretation, target, source);");
1101 _builder.newLineIfNotEmpty();
1102 _builder.append("}");
1103 _builder.newLine();
1104 _builder.newLine();
1105 _builder.append("pattern ");
1106 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_STRAIGHT);
1107 _builder.append("(");
1108 _builder.append(parameters);
1109 _builder.append(") {");
562 _builder.newLineIfNotEmpty(); 1110 _builder.newLineIfNotEmpty();
563 _builder.append("\t"); 1111 _builder.append("\t");
564 _builder.append("neg "); 1112 _builder.append("find outputReflexive_must_to_true_by_straight(problem, interpretation, source, target, _);");
565 CharSequence _referRelation_17 = generator.referRelation(Modes3UnitPropagationGenerator.this.straightRelation, "source", "potentialExtraInput", Modality.MAY, fqnToPQuery); 1113 _builder.newLine();
566 _builder.append(_referRelation_17, "\t"); 1114 _builder.append("} or {");
1115 _builder.newLine();
1116 _builder.append("\t");
1117 _builder.append("find turnoutOutputsAreSame_must_to_true_by_straight(problem, interpretation, source, target, _);");
1118 _builder.newLine();
1119 _builder.append("} or {");
1120 _builder.newLine();
1121 _builder.append("\t");
1122 _builder.append("find tooManyInputsOfSegment_must_to_true_by_straight(problem, interpretation, source, target, _);");
1123 _builder.newLine();
1124 _builder.append("} or {");
1125 _builder.newLine();
1126 _builder.append("\t");
1127 _builder.append("find turnoutConnectedToBothOutputs_must_to_true_by_straight(problem, interpretation, source, target, _);");
1128 _builder.newLine();
1129 _builder.append("} or {");
1130 _builder.newLine();
1131 _builder.append("\t");
1132 _builder.append("find tooManyInputsOfTurnout_must_to_true_by_straight(problem, interpretation, source, target, _);");
1133 _builder.newLine();
1134 _builder.append("}");
1135 _builder.newLine();
1136 _builder.newLine();
1137 _builder.append("pattern ");
1138 _builder.append(Modes3UnitPropagationGenerator.MUST_NOT_DIVERGENT);
1139 _builder.append("(");
1140 _builder.append(parameters);
1141 _builder.append(") {");
567 _builder.newLineIfNotEmpty(); 1142 _builder.newLineIfNotEmpty();
568 _builder.append("\t"); 1143 _builder.append("\t");
569 _builder.append("extraInput != potentialExtraInput;"); 1144 _builder.append("find outputReflexive_must_to_true_by_divergent(problem, interpretation, source, target, _);");
1145 _builder.newLine();
1146 _builder.append("} or {");
1147 _builder.newLine();
1148 _builder.append("\t");
1149 _builder.append("find turnoutOutputsAreSame_must_to_true_by_divergent(problem, interpretation, source, target, _);");
1150 _builder.newLine();
1151 _builder.append("} or {");
570 _builder.newLine(); 1152 _builder.newLine();
571 _builder.append("\t"); 1153 _builder.append("\t");
572 _builder.append("extraInput != target;"); 1154 _builder.append("find tooManyInputsOfSegment_must_to_true_by_divergent(problem, interpretation, source, target, _);");
1155 _builder.newLine();
1156 _builder.append("} or {");
1157 _builder.newLine();
1158 _builder.append("\t");
1159 _builder.append("find turnoutConnectedToBothOutputs_must_to_true_by_divergent(problem, interpretation, source, target, _);");
1160 _builder.newLine();
1161 _builder.append("} or {");
573 _builder.newLine(); 1162 _builder.newLine();
574 _builder.append("\t"); 1163 _builder.append("\t");
575 _builder.append("potentialExtraInput != target;"); 1164 _builder.append("find tooManyInputsOfTurnout_must_to_true_by_divergent(problem, interpretation, source, target, _);");
576 _builder.newLine(); 1165 _builder.newLine();
577 _builder.append("}"); 1166 _builder.append("}");
578 _builder.newLine(); 1167 _builder.newLine();
579 } 1168 }
580 }; 1169 };
581 _xblockexpression = _client_2; 1170 _xblockexpression = _client_3;
582 } 1171 }
583 return _xblockexpression; 1172 return _xblockexpression;
584 } 1173 }
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml
index 331e2b61..d4ab204e 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml
@@ -39,72 +39,4 @@
39 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.twoSynch"/> 39 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.twoSynch"/>
40 </group> 40 </group>
41 </extension> 41 </extension>
42 <extension id="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated" point="org.eclipse.viatra.query.runtime.queryspecification">
43 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated" id="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated">
44 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.entryInRegion_M0"/>
45 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.entryInRegion_M1"/>
46 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.entryInRegion_M2"/>
47 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M0"/>
48 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M1"/>
49 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M2"/>
50 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M3"/>
51 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M4"/>
52 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M5"/>
53 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M0"/>
54 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M1"/>
55 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M2"/>
56 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M3"/>
57 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M4"/>
58 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M5"/>
59 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M0"/>
60 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M1"/>
61 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M2"/>
62 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M3"/>
63 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M4"/>
64 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_M0"/>
65 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_1"/>
66 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_2"/>
67 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_3"/>
68 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_4"/>
69 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_5"/>
70 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M0"/>
71 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M1"/>
72 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M2"/>
73 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M3"/>
74 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M4"/>
75 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M5"/>
76 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M0"/>
77 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M1"/>
78 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M2"/>
79 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M3"/>
80 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M4"/>
81 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromExit_M0"/>
82 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromExit_M1"/>
83 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromExit_M2"/>
84 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromFinal_M0"/>
85 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromFinal_M1"/>
86 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromFinal_M2"/>
87 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M0"/>
88 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M1"/>
89 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M2"/>
90 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M3"/>
91 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.StateInRegion_M0"/>
92 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.StateInRegion_M1"/>
93 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.StateInRegion_M2"/>
94 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M0"/>
95 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M1"/>
96 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M2"/>
97 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M3"/>
98 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M4"/>
99 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M5"/>
100 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M6"/>
101 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M0"/>
102 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M1"/>
103 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M2"/>
104 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M3"/>
105 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M4"/>
106 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M5"/>
107 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M6"/>
108 </group>
109 </extension>
110</plugin> 42</plugin>
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend
index 431ae386..3bcd9116 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend
@@ -49,6 +49,12 @@ class ModelGenerationStatistics {
49 synchronized def addScopePropagationTime(long amount) { 49 synchronized def addScopePropagationTime(long amount) {
50 scopePropagationTime += amount 50 scopePropagationTime += amount
51 } 51 }
52
53 public var long mustRelationPropagationTime = 0
54
55 synchronized def addMustRelationPropagationTime(long amount) {
56 mustRelationPropagationTime += amount
57 }
52 58
53 public var long preliminaryTypeAnalisisTime = 0 59 public var long preliminaryTypeAnalisisTime = 0
54 60
@@ -133,9 +139,11 @@ class ModelGenerationMethodProvider {
133 139
134 val scopePropagator = createScopePropagator(scopePropagatorStrategy, emptySolution, hints, queries, statistics) 140 val scopePropagator = createScopePropagator(scopePropagatorStrategy, emptySolution, hints, queries, statistics)
135 scopePropagator.propagateAllScopeConstraints 141 scopePropagator.propagateAllScopeConstraints
142 val unitRulePropagator = refinementRuleProvider.createUnitPrulePropagator(logicProblem, emptySolution,
143 queries, scopePropagator, statistics)
136 val objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(logicProblem, emptySolution, 144 val objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(logicProblem, emptySolution,
137 queries, scopePropagator, nameNewElements, statistics) 145 queries, unitRulePropagator, nameNewElements, statistics)
138 val relationRefinementRules = refinementRuleProvider.createRelationRefinementRules(queries, scopePropagator, 146 val relationRefinementRules = refinementRuleProvider.createRelationRefinementRules(queries, unitRulePropagator,
139 statistics) 147 statistics)
140 148
141 val unfinishedMultiplicities = goalConstraintProvider.getUnfinishedMultiplicityQueries(logicProblem, queries, 149 val unfinishedMultiplicities = goalConstraintProvider.getUnfinishedMultiplicityQueries(logicProblem, queries,
@@ -158,7 +166,7 @@ class ModelGenerationMethodProvider {
158 val currentUnitPropagationPreconditions = queries.getCurrentUnitPropagationPreconditionPatterns 166 val currentUnitPropagationPreconditions = queries.getCurrentUnitPropagationPreconditionPatterns
159 167
160 val queriesToPrepare = ImmutableSet.builder.addAll(queries.refineObjectQueries.values).addAll( 168 val queriesToPrepare = ImmutableSet.builder.addAll(queries.refineObjectQueries.values).addAll(
161 queries.refineTypeQueries.values).addAll(queries.refinerelationQueries.values).addAll(queries. 169 queries.refineTypeQueries.values).addAll(queries.refineRelationQueries.values).addAll(queries.
162 multiplicityConstraintQueries.values.flatMap[allQueries]).addAll(queries.unfinishedWFQueries.values).addAll( 170 multiplicityConstraintQueries.values.flatMap[allQueries]).addAll(queries.unfinishedWFQueries.values).addAll(
163 queries.invalidWFQueries.values).addAll(queries.mustUnitPropagationPreconditionPatterns.values).addAll( 171 queries.invalidWFQueries.values).addAll(queries.mustUnitPropagationPreconditionPatterns.values).addAll(
164 queries.currentUnitPropagationPreconditionPatterns.values).add(queries.hasElementInContainmentQuery).build 172 queries.currentUnitPropagationPreconditionPatterns.values).add(queries.hasElementInContainmentQuery).build
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend
index 8c21ca1d..31f98e36 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend
@@ -3,8 +3,10 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality
3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type 3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
4import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator 4import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
6import java.util.Map
6import org.eclipse.viatra.query.runtime.api.IPatternMatch 7import org.eclipse.viatra.query.runtime.api.IPatternMatch
7import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher 8import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher
9import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
8 10
9interface LinearTypeExpressionBuilderFactory { 11interface LinearTypeExpressionBuilderFactory {
10 def ViatraQueryMatcher<? extends IPatternMatch> createMatcher(String queryName) 12 def ViatraQueryMatcher<? extends IPatternMatch> createMatcher(String queryName)
@@ -24,7 +26,7 @@ interface RelationConstraintUpdater {
24} 26}
25 27
26interface LinearTypeConstraintHint { 28interface LinearTypeConstraintHint {
27 def CharSequence getAdditionalPatterns(PatternGenerator patternGenerator) 29 def CharSequence getAdditionalPatterns(PatternGenerator patternGenerator, Map<String, PQuery> fqnToPQuery)
28 30
29 def RelationConstraintUpdater createConstraintUpdater(LinearTypeExpressionBuilderFactory builderFactory) 31 def RelationConstraintUpdater createConstraintUpdater(LinearTypeExpressionBuilderFactory builderFactory)
30} 32}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend
index 93b83577..cacba3c6 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend
@@ -19,6 +19,8 @@ class ScopePropagator {
19 val Map<PartialTypeInterpratation, Scope> type2Scope 19 val Map<PartialTypeInterpratation, Scope> type2Scope
20 @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> superScopes 20 @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> superScopes
21 @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> subScopes 21 @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> subScopes
22
23 @Accessors(PUBLIC_GETTER) var scopePropagationNeeded = false
22 24
23 new(PartialInterpretation p, ModelGenerationStatistics statistics) { 25 new(PartialInterpretation p, ModelGenerationStatistics statistics) {
24 partialInterpretation = p 26 partialInterpretation = p
@@ -64,7 +66,8 @@ class ScopePropagator {
64 copyScopeBoundsToHeuristic() 66 copyScopeBoundsToHeuristic()
65 } 67 }
66 68
67 def propagateAllScopeConstraints() { 69 def void propagateAllScopeConstraints() {
70 scopePropagationNeeded = false
68 if (!valid) { 71 if (!valid) {
69 return 72 return
70 } 73 }
@@ -93,6 +96,7 @@ class ScopePropagator {
93 if (isPrimitive) { 96 if (isPrimitive) {
94 return 97 return
95 } 98 }
99 scopePropagationNeeded = true
96// println('''Adding to «(t as PartialComplexTypeInterpretation).interpretationOf.name»''') 100// println('''Adding to «(t as PartialComplexTypeInterpretation).interpretationOf.name»''')
97 val targetScope = type2Scope.get(t) 101 val targetScope = type2Scope.get(t)
98 if (targetScope !== null) { 102 if (targetScope !== null) {
@@ -117,6 +121,12 @@ class ScopePropagator {
117// this.partialInterpretation.scopes.forEach[println(''' «(it.targetTypeInterpretation as PartialComplexTypeInterpretation).interpretationOf.name»: «it.minNewElements»-«it.maxNewElements»''')] 121// this.partialInterpretation.scopes.forEach[println(''' «(it.targetTypeInterpretation as PartialComplexTypeInterpretation).interpretationOf.name»: «it.minNewElements»-«it.maxNewElements»''')]
118// println('''All constraints are propagated upon increasing «(t as PartialComplexTypeInterpretation).interpretationOf.name»''') 122// println('''All constraints are propagated upon increasing «(t as PartialComplexTypeInterpretation).interpretationOf.name»''')
119 } 123 }
124
125 def addedToRelation(Relation r) {
126 if (isPropagationNeededAfterAdditionToRelation(r)) {
127 scopePropagationNeeded = true
128 }
129 }
120 130
121 protected def setScopesInvalid() { 131 protected def setScopesInvalid() {
122 partialInterpretation.minNewElements = Integer.MAX_VALUE 132 partialInterpretation.minNewElements = Integer.MAX_VALUE
@@ -127,7 +137,7 @@ class ScopePropagator {
127 } 137 }
128 } 138 }
129 139
130 def isPropagationNeededAfterAdditionToRelation(Relation r) { 140 protected def isPropagationNeededAfterAdditionToRelation(Relation r) {
131 false 141 false
132 } 142 }
133 143
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend
index a3efcf76..edf92343 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend
@@ -369,13 +369,13 @@ class PatternGenerator {
369 ////////// 369 //////////
370 // 4.3 Relation refinement 370 // 4.3 Relation refinement
371 ////////// 371 //////////
372 «relationRefinementGenerator.generateRefineReference(problem)» 372 «relationRefinementGenerator.generateRefineReference(problem, unitPropagationPatternGenerators
373 373
374 ////////// 374 //////////
375 // 5 Hints 375 // 5 Hints
376 ////////// 376 //////////
377 «FOR hint : hints» 377 «FOR hint : hints»
378 «hint.getAdditionalPatterns(this)» 378 «hint.getAdditionalPatterns(this, fqn2PQuery
379 «ENDFOR» 379 «ENDFOR»
380 «FOR generator : unitPropagationPatternGenerators» 380 «FOR generator : unitPropagationPatternGenerators»
381 «generator.getAdditionalPatterns(this, fqn2PQuery)» 381 «generator.getAdditionalPatterns(this, fqn2PQuery)»
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend
index 21fd1989..2e786286 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend
@@ -38,7 +38,8 @@ import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
38 public IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> hasElementInContainmentQuery 38 public IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> hasElementInContainmentQuery
39 public Map<ObjectCreationPrecondition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineObjectQueries 39 public Map<ObjectCreationPrecondition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineObjectQueries
40 public Map<? extends Type, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineTypeQueries 40 public Map<? extends Type, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineTypeQueries
41 public Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refinerelationQueries 41 public Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineRelationQueries
42 public Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> mustRelationPropagationQueries
42 public Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> mustUnitPropagationPreconditionPatterns 43 public Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> mustUnitPropagationPreconditionPatterns
43 public Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> currentUnitPropagationPreconditionPatterns 44 public Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> currentUnitPropagationPreconditionPatterns
44 public Map<RelationDefinition, ModalPatternQueries> modalRelationQueries 45 public Map<RelationDefinition, ModalPatternQueries> modalRelationQueries
@@ -70,7 +71,6 @@ class UnifinishedMultiplicityQueries {
70} 71}
71 72
72class PatternProvider { 73class PatternProvider {
73
74 val TypeAnalysis typeAnalysis = new TypeAnalysis 74 val TypeAnalysis typeAnalysis = new TypeAnalysis
75 75
76 def generateQueries(LogicProblem problem, PartialInterpretation emptySolution, ModelGenerationStatistics statistics, 76 def generateQueries(LogicProblem problem, PartialInterpretation emptySolution, ModelGenerationStatistics statistics,
@@ -98,7 +98,8 @@ class PatternProvider {
98 val generatedQueries = parseUtil.parse(patternGeneratorResult.patternText) 98 val generatedQueries = parseUtil.parse(patternGeneratorResult.patternText)
99 val runtimeQueries = calclulateRuntimeQueries(patternGenerator, problem, emptySolution, typeAnalysisResult, 99 val runtimeQueries = calclulateRuntimeQueries(patternGenerator, problem, emptySolution, typeAnalysisResult,
100 patternGeneratorResult.constraint2MustPreconditionName, 100 patternGeneratorResult.constraint2MustPreconditionName,
101 patternGeneratorResult.constraint2CurrentPreconditionName, relationConstraints, generatedQueries) 101 patternGeneratorResult.constraint2CurrentPreconditionName, relationConstraints,
102 unitPropagationPatternGenerators, generatedQueries)
102 return runtimeQueries 103 return runtimeQueries
103 } 104 }
104 105
@@ -110,6 +111,7 @@ class PatternProvider {
110 HashMap<PConstraint, String> mustUnitPropagationTrace, 111 HashMap<PConstraint, String> mustUnitPropagationTrace,
111 HashMap<PConstraint, String> currentUnitPropagationTrace, 112 HashMap<PConstraint, String> currentUnitPropagationTrace,
112 RelationConstraints relationConstraints, 113 RelationConstraints relationConstraints,
114 Collection<UnitPropagationPatternGenerator> unitPropagationPatternGenerators,
113 Map<String, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> queries 115 Map<String, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> queries
114 ) { 116 ) {
115 val Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> invalidWFQueries = patternGenerator. 117 val Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> invalidWFQueries = patternGenerator.
@@ -136,6 +138,8 @@ class PatternProvider {
136 ] 138 ]
137 val Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineRelationQueries = patternGenerator. 139 val Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineRelationQueries = patternGenerator.
138 relationRefinementGenerator.getRefineRelationQueries(problem).mapValues[it.lookup(queries)] 140 relationRefinementGenerator.getRefineRelationQueries(problem).mapValues[it.lookup(queries)]
141 val Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> mustRelationPropagationQueries = patternGenerator.
142 relationRefinementGenerator.getMustPropagationQueries(problem, unitPropagationPatternGenerators).mapValues[it.lookup(queries)]
139 val Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> mustUnitPropagationPreconditionPatterns = mustUnitPropagationTrace. 143 val Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> mustUnitPropagationPreconditionPatterns = mustUnitPropagationTrace.
140 mapValues[it.lookup(queries)] 144 mapValues[it.lookup(queries)]
141 val Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> currentUnitPropagationPreconditionPatterns = currentUnitPropagationTrace. 145 val Map<PConstraint, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> currentUnitPropagationPreconditionPatterns = currentUnitPropagationTrace.
@@ -158,6 +162,7 @@ class PatternProvider {
158 refineObjectsQueries, 162 refineObjectsQueries,
159 refineTypeQueries, 163 refineTypeQueries,
160 refineRelationQueries, 164 refineRelationQueries,
165 mustRelationPropagationQueries,
161 mustUnitPropagationPreconditionPatterns, 166 mustUnitPropagationPreconditionPatterns,
162 currentUnitPropagationPreconditionPatterns, 167 currentUnitPropagationPreconditionPatterns,
163 modalRelationQueries, 168 modalRelationQueries,
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend
index 29d3eb61..23ba3cad 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend
@@ -113,7 +113,7 @@ class RelationDeclarationIndexer {
113 // 2. Circle in the containment hierarchy 113 // 2. Circle in the containment hierarchy
114 neg «base.containmentIndexer.referTransitiveMustContains("source","target")» 114 neg «base.containmentIndexer.referTransitiveMustContains("source","target")»
115 «ENDIF» 115 «ENDIF»
116 «IF mustNotRelations.empty» 116 «IF !mustNotRelations.empty»
117 // ![] unit propagation relations 117 // ![] unit propagation relations
118 «FOR mustNotRelation : mustNotRelations» 118 «FOR mustNotRelation : mustNotRelations»
119 neg find «mustNotRelation»(problem, interpretation, source, target); 119 neg find «mustNotRelation»(problem, interpretation, source, target);
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend
index 783cd36b..6f5f2402 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend
@@ -1,10 +1,17 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns 1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns
2 2
3import com.google.common.collect.ImmutableList
4import com.google.common.collect.ImmutableMap
5import com.google.common.collect.ImmutableSet
3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation 6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation
4import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration 7import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration
5import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem 8import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality 9import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality
10import java.util.Collection
7import java.util.LinkedList 11import java.util.LinkedList
12import java.util.Map
13import java.util.Set
14import org.eclipse.xtend2.lib.StringConcatenationClient
8 15
9class RelationRefinementGenerator { 16class RelationRefinementGenerator {
10 PatternGenerator base; 17 PatternGenerator base;
@@ -13,53 +20,61 @@ class RelationRefinementGenerator {
13 this.base = base 20 this.base = base
14 } 21 }
15 22
16 def CharSequence generateRefineReference(LogicProblem p) ''' 23 def CharSequence generateRefineReference(LogicProblem p,
17 «FOR relationRefinement : this.getRelationRefinements(p)» 24 Collection<UnitPropagationPatternGenerator> unitPropagationPatternGenerators) {
18 pattern «relationRefinementQueryName(relationRefinement.key,relationRefinement.value)»( 25 val mustRelations = getMustRelations(unitPropagationPatternGenerators)
19 problem:LogicProblem, interpretation:PartialInterpretation, 26
20 relationIterpretation:PartialRelationInterpretation«IF relationRefinement.value !== null», oppositeInterpretation:PartialRelationInterpretation«ENDIF», 27 '''
21 from: DefinedElement, to: DefinedElement) 28 «FOR relationRefinement : this.getRelationRefinements(p)»
22 { 29 pattern «relationRefinementQueryName(relationRefinement.key,relationRefinement.value)»(
23 find interpretation(problem,interpretation); 30 problem:LogicProblem, interpretation:PartialInterpretation,
24 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); 31 relationIterpretation:PartialRelationInterpretation«IF relationRefinement.value !== null», oppositeInterpretation:PartialRelationInterpretation«ENDIF»,
25 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"«relationRefinement.key.name»"); 32 from: DefinedElement, to: DefinedElement)
26 «IF relationRefinement.value !== null» 33 {
27 PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); 34 find interpretation(problem,interpretation);
28 PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"«relationRefinement.value.name»"); 35 PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
36 PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"«relationRefinement.key.name»");
37 «IF relationRefinement.value !== null»
38 PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
39 PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"«relationRefinement.value.name»");
40 «ENDIF»
41 find mustExist(problem, interpretation, from);
42 find mustExist(problem, interpretation, to);
43 «base.typeIndexer.referInstanceOfByReference(relationRefinement.key.parameters.get(0), Modality::MUST,"from")»
44 «base.typeIndexer.referInstanceOfByReference(relationRefinement.key.parameters.get(1), Modality::MUST,"to")»
45 «base.relationDeclarationIndexer.referRelation(relationRefinement.key,"from","to",Modality.MAY)»
46 neg «base.relationDeclarationIndexer.referRelation(relationRefinement.key,"from","to",Modality.MUST)»
47 }
48
49 «IF isMustPropagationQueryNeeded(relationRefinement.key, relationRefinement.value, mustRelations)»
50 pattern «mustPropagationQueryName(relationRefinement.key)»(
51 problem:LogicProblem, interpretation:PartialInterpretation,
52 relationIterpretation:PartialRelationInterpretation«IF relationRefinement.value !== null», oppositeInterpretation:PartialRelationInterpretation«ENDIF»,
53 from: DefinedElement, to: DefinedElement)
54 «FOR body : getMustPropagationBodies(relationRefinement.key, relationRefinement.value, mustRelations) SEPARATOR " or "»
55 {
56 «referRefinementQuery(relationRefinement.key, relationRefinement.value, "relationIterpretation", "oppositeInterpretation", "from", "to")»
57 «body»
58 }
59 «ENDFOR»
29 «ENDIF» 60 «ENDIF»
30 find mustExist(problem, interpretation, from); 61 «ENDFOR»
31 find mustExist(problem, interpretation, to); 62 '''
32 «base.typeIndexer.referInstanceOfByReference(relationRefinement.key.parameters.get(0), Modality::MUST,"from")» 63 }
33 «base.typeIndexer.referInstanceOfByReference(relationRefinement.key.parameters.get(1), Modality::MUST,"to")»
34 «base.relationDeclarationIndexer.referRelation(relationRefinement.key,"from","to",Modality.MAY)»
35 neg «base.relationDeclarationIndexer.referRelation(relationRefinement.key,"from","to",Modality.MUST)»
36 }
37 «ENDFOR»
38 '''
39 64
40 def String relationRefinementQueryName(RelationDeclaration relation, Relation inverseRelation) { 65 def String relationRefinementQueryName(RelationDeclaration relation, Relation inverseRelation) {
41 '''«IF inverseRelation !== null»refineRelation_«base.canonizeName(relation.name)»_and_«base.canonizeName(inverseRelation.name)»«ELSE»refineRelation_«base.canonizeName(relation.name)»«ENDIF»''' 66 '''«IF inverseRelation !== null»refineRelation_«base.canonizeName(relation.name)»_and_«base.canonizeName(inverseRelation.name)»«ELSE»refineRelation_«base.canonizeName(relation.name)»«ENDIF»'''
42 } 67 }
43 68
69 def String mustPropagationQueryName(RelationDeclaration relation) {
70 '''mustPropagation_«base.canonizeName(relation.name)»'''
71 }
72
44 def referRefinementQuery(RelationDeclaration relation, Relation inverseRelation, String relInterpretationName, 73 def referRefinementQuery(RelationDeclaration relation, Relation inverseRelation, String relInterpretationName,
45 String inverseInterpretationName, String sourceName, 74 String inverseInterpretationName, String sourceName,
46 String targetName) '''find «this.relationRefinementQueryName(relation,inverseRelation)»(problem, interpretation, «relInterpretationName», «IF inverseRelation !== null»«inverseInterpretationName», «ENDIF»«sourceName», «targetName»);''' 75 String targetName) '''find «this.relationRefinementQueryName(relation,inverseRelation)»(problem, interpretation, «relInterpretationName», «IF inverseRelation !== null»«inverseInterpretationName», «ENDIF»«sourceName», «targetName»);'''
47 76
48 def getRefineRelationQueries(LogicProblem p) { 77 def getRefineRelationQueries(LogicProblem p) {
49// val containmentRelations = p.containmentHierarchies.map[containmentRelations].flatten.toSet
50// p.relations.filter(RelationDeclaration).filter[!containmentRelations.contains(it)].toInvertedMap['''refineRelation_«base.canonizeName(it.name)»''']
51 /*
52 * val res = new LinkedHashMap
53 * for(relation: getRelationRefinements(p)) {
54 * if(inverseRelations.containsKey(relation)) {
55 * val name = '''refineRelation_«base.canonizeName(relation.name)»_and_«base.canonizeName(inverseRelations.get(relation).name)»'''
56 * res.put(relation -> inverseRelations.get(relation),name)
57 * } else {
58 * val name = '''refineRelation_«base.canonizeName(relation.name)»'''
59 * res.put(relation -> null,name)
60 * }
61 * }
62 return res*/
63 getRelationRefinements(p).toInvertedMap[relationRefinementQueryName(it.key, it.value)] 78 getRelationRefinements(p).toInvertedMap[relationRefinementQueryName(it.key, it.value)]
64 } 79 }
65 80
@@ -83,4 +98,54 @@ class RelationRefinementGenerator {
83 } 98 }
84 return list 99 return list
85 } 100 }
101
102 def getMustPropagationQueries(LogicProblem p,
103 Collection<UnitPropagationPatternGenerator> unitPropagationPatternGenerators) {
104 val refinements = getRelationRefinements(p)
105 val mustRelations = getMustRelations(unitPropagationPatternGenerators)
106 refinements.filter[isMustPropagationQueryNeeded(key, value, mustRelations)].toInvertedMap [
107 mustPropagationQueryName(key)
108 ]
109 }
110
111 private def getMustRelations(Collection<UnitPropagationPatternGenerator> unitPropagationPatternGenerators) {
112 ImmutableMap.copyOf(unitPropagationPatternGenerators.flatMap[mustPatterns.entrySet].groupBy[key].mapValues [
113 ImmutableSet.copyOf(map[value])
114 ])
115 }
116
117 private def isMustPropagationQueryNeeded(Relation relation, Relation inverseRelation,
118 Map<Relation, ? extends Set<String>> mustRelations) {
119 val mustSet = mustRelations.get(relation)
120 if (mustSet !== null && !mustSet.empty) {
121 return true
122 }
123 if (inverseRelation !== null) {
124 val inverseMustSet = mustRelations.get(inverseRelation)
125 if (inverseMustSet !== null && !inverseMustSet.empty) {
126 return true
127 }
128 }
129 false
130 }
131
132 private def getMustPropagationBodies(Relation relation, Relation inverseRelation,
133 Map<Relation, ? extends Set<String>> mustRelations) {
134 val builder = ImmutableList.<StringConcatenationClient>builder()
135 val mustSet = mustRelations.get(relation)
136 if (mustSet !== null) {
137 for (refinementQuery : mustSet) {
138 builder.add('''find «refinementQuery»(problem, interpretation, from, to);''')
139 }
140 }
141 if (inverseRelation !== null && inverseRelation != relation) {
142 val inverseMustSet = mustRelations.get(inverseRelation)
143 if (inverseMustSet !== null) {
144 for (refinementQuery : inverseMustSet) {
145 builder.add('''find «refinementQuery»(problem, interpretation, to, from);''')
146 }
147 }
148 }
149 builder.build
150 }
86} 151}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend
index 699b095d..dca10baf 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend
@@ -1,5 +1,6 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules 1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules
2 2
3import com.google.common.collect.ImmutableList
3import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion 4import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion
4import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.LowerMultiplicityAssertion 5import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.LowerMultiplicityAssertion
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference 6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference
@@ -29,12 +30,14 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par
29import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory 30import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory
30import java.lang.reflect.Field 31import java.lang.reflect.Field
31import java.util.HashMap 32import java.util.HashMap
33import java.util.Iterator
32import java.util.LinkedHashMap 34import java.util.LinkedHashMap
33import java.util.LinkedList 35import java.util.LinkedList
34import java.util.List 36import java.util.List
35import java.util.Map 37import java.util.Map
36import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine 38import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine
37import org.eclipse.viatra.query.runtime.api.GenericPatternMatch 39import org.eclipse.viatra.query.runtime.api.GenericPatternMatch
40import org.eclipse.viatra.query.runtime.api.IPatternMatch
38import org.eclipse.viatra.query.runtime.api.IQuerySpecification 41import org.eclipse.viatra.query.runtime.api.IQuerySpecification
39import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine 42import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine
40import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher 43import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher
@@ -43,6 +46,7 @@ import org.eclipse.viatra.query.runtime.rete.matcher.ReteBackendFactory
43import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRule 46import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRule
44import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRuleFactory 47import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRuleFactory
45import org.eclipse.xtend.lib.annotations.Data 48import org.eclipse.xtend.lib.annotations.Data
49import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
46import org.eclipse.xtext.xbase.lib.Functions.Function0 50import org.eclipse.xtext.xbase.lib.Functions.Function0
47 51
48class RefinementRuleProvider { 52class RefinementRuleProvider {
@@ -50,57 +54,55 @@ class RefinementRuleProvider {
50 val extension PartialinterpretationFactory factory2 = PartialinterpretationFactory.eINSTANCE 54 val extension PartialinterpretationFactory factory2 = PartialinterpretationFactory.eINSTANCE
51 val extension LogiclanguageFactory factory3 = LogiclanguageFactory.eINSTANCE 55 val extension LogiclanguageFactory factory3 = LogiclanguageFactory.eINSTANCE
52 56
53 var AdvancedViatraQueryEngine queryEngine
54 var Field delayMessageDelivery
55
56 def canonizeName(String name) { 57 def canonizeName(String name) {
57 return name.replace(' ', '_') 58 return name.replace(' ', '_')
58 } 59 }
59 60
61 def createUnitPrulePropagator(LogicProblem p, PartialInterpretation i, GeneratedPatterns patterns,
62 ScopePropagator scopePropagator, ModelGenerationStatistics statistics) {
63 new UnitRulePropagator(p, i, this, scopePropagator, patterns.mustRelationPropagationQueries, statistics)
64 }
65
60 def LinkedHashMap<ObjectCreationPrecondition, BatchTransformationRule<GenericPatternMatch, ViatraQueryMatcher<GenericPatternMatch>>> createObjectRefinementRules( 66 def LinkedHashMap<ObjectCreationPrecondition, BatchTransformationRule<GenericPatternMatch, ViatraQueryMatcher<GenericPatternMatch>>> createObjectRefinementRules(
61 LogicProblem p, 67 LogicProblem p,
62 PartialInterpretation i, 68 PartialInterpretation i,
63 GeneratedPatterns patterns, 69 GeneratedPatterns patterns,
64 ScopePropagator scopePropagator, 70 UnitRulePropagator unitRulePropagator,
65 boolean nameNewElement, 71 boolean nameNewElement,
66 ModelGenerationStatistics statistics 72 ModelGenerationStatistics statistics
67 ) { 73 ) {
68 val res = new LinkedHashMap 74 val res = new LinkedHashMap
69 val recursiveObjectCreation = recursiveObjectCreation(p, i) 75 val recursiveObjectCreation = recursiveObjectCreation(p, i)
70 queryEngine = ViatraQueryEngine.on(new EMFScope(i)) as AdvancedViatraQueryEngine
71 delayMessageDelivery = queryEngine.class.getDeclaredField("delayMessageDelivery")
72 delayMessageDelivery.accessible = true
73 for (LHSEntry : patterns.refineObjectQueries.entrySet) { 76 for (LHSEntry : patterns.refineObjectQueries.entrySet) {
74 val containmentRelation = LHSEntry.key.containmentRelation 77 val containmentRelation = LHSEntry.key.containmentRelation
75 val inverseRelation = LHSEntry.key.inverseContainment 78 val inverseRelation = LHSEntry.key.inverseContainment
76 val type = LHSEntry.key.newType 79 val type = LHSEntry.key.newType
77 val lhs = LHSEntry.value as IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> 80 val lhs = LHSEntry.value as IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>>
78 val rule = createObjectCreationRule(p, containmentRelation, inverseRelation, type, 81 val rule = createObjectCreationRule(p, containmentRelation, inverseRelation, type,
79 recursiveObjectCreation.get(type), lhs, nameNewElement, scopePropagator, statistics) 82 recursiveObjectCreation.get(type), lhs, nameNewElement, unitRulePropagator, statistics)
80 res.put(LHSEntry.key, rule) 83 res.put(LHSEntry.key, rule)
81 } 84 }
82 return res 85 return res
83 } 86 }
84 87
85 def private createObjectCreationRule(LogicProblem p, Relation containmentRelation, Relation inverseRelation, 88 def private createObjectCreationRule(LogicProblem p, Relation containmentRelation, Relation inverseRelation,
86 Type type, List<ObjectCreationInterpretationData> recursiceObjectCreations, 89 Type type, List<ObjectCreationInterpretationData> recursiveObjectCreations,
87 IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> lhs, boolean nameNewElement, 90 IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> lhs, boolean nameNewElement,
88 ScopePropagator scopePropagator, ModelGenerationStatistics statistics) { 91 UnitRulePropagator unitRulePropagator, ModelGenerationStatistics statistics) {
89 val name = '''addObject_«type.name.canonizeName»«IF containmentRelation!==null»_by_«containmentRelation.name.canonizeName»«ENDIF»''' 92 val name = '''addObject_«type.name.canonizeName»«IF containmentRelation!==null»_by_«containmentRelation.name.canonizeName»«ENDIF»'''
90 val ruleBuilder = factory.createRule(lhs).name(name) 93 val ruleBuilder = factory.createRule(lhs).name(name)
91 if (containmentRelation !== null) { 94 if (containmentRelation !== null) {
92 if (inverseRelation !== null) { 95 if (inverseRelation !== null) {
93 ruleBuilder.action [ match | 96 ruleBuilder.action [ match |
94 statistics.incrementTransformationCount 97 statistics.incrementTransformationCount
95// println(name) 98// println(name)
99 val startTime = System.nanoTime
96 // val problem = match.get(0) as LogicProblem 100 // val problem = match.get(0) as LogicProblem
97 val interpretation = match.get(1) as PartialInterpretation 101 val interpretation = match.get(1) as PartialInterpretation
98 val relationInterpretation = match.get(2) as PartialRelationInterpretation 102 val relationInterpretation = match.get(2) as PartialRelationInterpretation
99 val inverseRelationInterpretation = match.get(3) as PartialRelationInterpretation 103 val inverseRelationInterpretation = match.get(3) as PartialRelationInterpretation
100 val typeInterpretation = match.get(4) as PartialComplexTypeInterpretation 104 val typeInterpretation = match.get(4) as PartialComplexTypeInterpretation
101 val container = match.get(5) as DefinedElement 105 val container = match.get(5) as DefinedElement
102
103 val startTime = System.nanoTime
104 createObjectActionWithContainmentAndInverse( 106 createObjectActionWithContainmentAndInverse(
105 nameNewElement, 107 nameNewElement,
106 interpretation, 108 interpretation,
@@ -109,29 +111,24 @@ class RefinementRuleProvider {
109 relationInterpretation, 111 relationInterpretation,
110 inverseRelationInterpretation, 112 inverseRelationInterpretation,
111 [createDefinedElement], 113 [createDefinedElement],
112 recursiceObjectCreations, 114 recursiveObjectCreations,
113 scopePropagator 115 unitRulePropagator
114 ) 116 )
115 statistics.addExecutionTime(System.nanoTime - startTime) 117 statistics.addExecutionTime(System.nanoTime - startTime)
116 118
117 flushQueryEngine(scopePropagator) 119 unitRulePropagator.propagate
118
119 // Scope propagation
120 val propagatorStartTime = System.nanoTime
121 scopePropagator.propagateAllScopeConstraints()
122 statistics.addScopePropagationTime(System.nanoTime - propagatorStartTime)
123 ] 120 ]
124 } else { 121 } else {
125 ruleBuilder.action [ match | 122 ruleBuilder.action [ match |
126 statistics.incrementTransformationCount 123 statistics.incrementTransformationCount
127// println(name) 124// println(name)
125 val startTime = System.nanoTime
128 // val problem = match.get(0) as LogicProblem 126 // val problem = match.get(0) as LogicProblem
129 val interpretation = match.get(1) as PartialInterpretation 127 val interpretation = match.get(1) as PartialInterpretation
130 val relationInterpretation = match.get(2) as PartialRelationInterpretation 128 val relationInterpretation = match.get(2) as PartialRelationInterpretation
131 val typeInterpretation = match.get(3) as PartialComplexTypeInterpretation 129 val typeInterpretation = match.get(3) as PartialComplexTypeInterpretation
132 val container = match.get(4) as DefinedElement 130 val container = match.get(4) as DefinedElement
133 131
134 val startTime = System.nanoTime
135 createObjectActionWithContainment( 132 createObjectActionWithContainment(
136 nameNewElement, 133 nameNewElement,
137 interpretation, 134 interpretation,
@@ -139,44 +136,34 @@ class RefinementRuleProvider {
139 container, 136 container,
140 relationInterpretation, 137 relationInterpretation,
141 [createDefinedElement], 138 [createDefinedElement],
142 recursiceObjectCreations, 139 recursiveObjectCreations,
143 scopePropagator 140 unitRulePropagator
144 ) 141 )
145 statistics.addExecutionTime(System.nanoTime - startTime) 142 statistics.addExecutionTime(System.nanoTime - startTime)
146 143
147 flushQueryEngine(scopePropagator) 144 unitRulePropagator.propagate
148
149 // Scope propagation
150 val propagatorStartTime = System.nanoTime
151 scopePropagator.propagateAllScopeConstraints()
152 statistics.addScopePropagationTime(System.nanoTime - propagatorStartTime)
153 ] 145 ]
154 } 146 }
155 } else { 147 } else {
156 ruleBuilder.action [ match | 148 ruleBuilder.action [ match |
157 statistics.incrementTransformationCount 149 statistics.incrementTransformationCount
158// println(name) 150// println(name)
151 val startTime = System.nanoTime
159 // val problem = match.get(0) as LogicProblem 152 // val problem = match.get(0) as LogicProblem
160 val interpretation = match.get(1) as PartialInterpretation 153 val interpretation = match.get(1) as PartialInterpretation
161 val typeInterpretation = match.get(2) as PartialComplexTypeInterpretation 154 val typeInterpretation = match.get(2) as PartialComplexTypeInterpretation
162 155
163 val startTime = System.nanoTime
164 createObjectAction( 156 createObjectAction(
165 nameNewElement, 157 nameNewElement,
166 interpretation, 158 interpretation,
167 typeInterpretation, 159 typeInterpretation,
168 [createDefinedElement], 160 [createDefinedElement],
169 recursiceObjectCreations, 161 recursiveObjectCreations,
170 scopePropagator 162 unitRulePropagator
171 ) 163 )
172 statistics.addExecutionTime(System.nanoTime - startTime) 164 statistics.addExecutionTime(System.nanoTime - startTime)
173 165
174 flushQueryEngine(scopePropagator) 166 unitRulePropagator.propagate
175
176 // Scope propagation
177 val propagatorStartTime = System.nanoTime
178 scopePropagator.propagateAllScopeConstraints()
179 statistics.addScopePropagationTime(System.nanoTime - propagatorStartTime)
180 ] 167 ]
181 } 168 }
182 return ruleBuilder.build 169 return ruleBuilder.build
@@ -342,14 +329,14 @@ class RefinementRuleProvider {
342 [createStringElement] 329 [createStringElement]
343 } 330 }
344 331
345 def createRelationRefinementRules(GeneratedPatterns patterns, ScopePropagator scopePropagator, 332 def createRelationRefinementRules(GeneratedPatterns patterns, UnitRulePropagator unitRulePropagator,
346 ModelGenerationStatistics statistics) { 333 ModelGenerationStatistics statistics) {
347 val res = new LinkedHashMap 334 val res = new LinkedHashMap
348 for (LHSEntry : patterns.refinerelationQueries.entrySet) { 335 for (LHSEntry : patterns.refineRelationQueries.entrySet) {
349 val declaration = LHSEntry.key.key 336 val declaration = LHSEntry.key.key
350 val inverseReference = LHSEntry.key.value 337 val inverseReference = LHSEntry.key.value
351 val lhs = LHSEntry.value as IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> 338 val lhs = LHSEntry.value as IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>>
352 val rule = createRelationRefinementRule(declaration, inverseReference, lhs, scopePropagator, statistics) 339 val rule = createRelationRefinementRule(declaration, inverseReference, lhs, unitRulePropagator, statistics)
353 res.put(LHSEntry.key, rule) 340 res.put(LHSEntry.key, rule)
354 } 341 }
355 return res 342 return res
@@ -357,57 +344,29 @@ class RefinementRuleProvider {
357 344
358 def private BatchTransformationRule<GenericPatternMatch, ViatraQueryMatcher<GenericPatternMatch>> createRelationRefinementRule( 345 def private BatchTransformationRule<GenericPatternMatch, ViatraQueryMatcher<GenericPatternMatch>> createRelationRefinementRule(
359 RelationDeclaration declaration, Relation inverseRelation, 346 RelationDeclaration declaration, Relation inverseRelation,
360 IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> lhs, ScopePropagator scopePropagator, 347 IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> lhs, UnitRulePropagator unitRulePropagator,
361 ModelGenerationStatistics statistics) { 348 ModelGenerationStatistics statistics) {
362 val name = '''addRelation_«declaration.name.canonizeName»«IF inverseRelation !== null»_and_«inverseRelation.name.canonizeName»«ENDIF»''' 349 val name = '''addRelation_«declaration.name.canonizeName»«IF inverseRelation !== null»_and_«inverseRelation.name.canonizeName»«ENDIF»'''
363 val ruleBuilder = factory.createRule(lhs).name(name) 350 val ruleBuilder = factory.createRule(lhs).name(name)
364 if (inverseRelation === null) { 351 if (inverseRelation === null) {
365 ruleBuilder.action [ match | 352 ruleBuilder.action [ match |
366 statistics.incrementTransformationCount 353 statistics.incrementTransformationCount
367
368// println(name) 354// println(name)
369 // val problem = match.get(0) as LogicProblem
370 // val interpretation = match.get(1) as PartialInterpretation
371 val relationInterpretation = match.get(2) as PartialRelationInterpretation
372 val src = match.get(3) as DefinedElement
373 val trg = match.get(4) as DefinedElement
374
375 val startTime = System.nanoTime 355 val startTime = System.nanoTime
376 createRelationLinkAction(src, trg, relationInterpretation) 356 createRelationLinkAction(match, unitRulePropagator)
377 statistics.addExecutionTime(System.nanoTime - startTime) 357 statistics.addExecutionTime(System.nanoTime - startTime)
378 358
379 // Scope propagation 359 unitRulePropagator.propagate
380 if (scopePropagator.isPropagationNeededAfterAdditionToRelation(declaration)) {
381 flushQueryEngine(scopePropagator)
382
383 val propagatorStartTime = System.nanoTime
384 scopePropagator.propagateAllScopeConstraints()
385 statistics.addScopePropagationTime(System.nanoTime - propagatorStartTime)
386 }
387 ] 360 ]
388 } else { 361 } else {
389 ruleBuilder.action [ match | 362 ruleBuilder.action [ match |
390 statistics.incrementTransformationCount 363 statistics.incrementTransformationCount
391// println(name) 364// println(name)
392 // val problem = match.get(0) as LogicProblem
393 // val interpretation = match.get(1) as PartialInterpretation
394 val relationInterpretation = match.get(2) as PartialRelationInterpretation
395 val inverseInterpretation = match.get(3) as PartialRelationInterpretation
396 val src = match.get(4) as DefinedElement
397 val trg = match.get(5) as DefinedElement
398
399 val startTime = System.nanoTime 365 val startTime = System.nanoTime
400 createRelationLinkWithInverse(src, trg, relationInterpretation, inverseInterpretation) 366 createRelationLinkWithInverse(match, unitRulePropagator)
401 statistics.addExecutionTime(System.nanoTime - startTime) 367 statistics.addExecutionTime(System.nanoTime - startTime)
402 368
403 // Scope propagation 369 unitRulePropagator.propagate
404 if (scopePropagator.isPropagationNeededAfterAdditionToRelation(declaration)) {
405 flushQueryEngine(scopePropagator)
406
407 val propagatorStartTime = System.nanoTime
408 scopePropagator.propagateAllScopeConstraints()
409 statistics.addScopePropagationTime(System.nanoTime - propagatorStartTime)
410 }
411 ] 370 ]
412 } 371 }
413 372
@@ -418,7 +377,7 @@ class RefinementRuleProvider {
418 // Actions 377 // Actions
419 // /////////////////////// 378 // ///////////////////////
420 protected def void createObjectAction(boolean nameNewElement, ObjectCreationInterpretationData data, 379 protected def void createObjectAction(boolean nameNewElement, ObjectCreationInterpretationData data,
421 DefinedElement container, ScopePropagator scopePropagator) { 380 DefinedElement container, UnitRulePropagator unitRulePropagator) {
422 if (data.containerInterpretation !== null) { 381 if (data.containerInterpretation !== null) {
423 if (data.containerInverseInterpretation !== null) { 382 if (data.containerInverseInterpretation !== null) {
424 createObjectActionWithContainmentAndInverse( 383 createObjectActionWithContainmentAndInverse(
@@ -430,7 +389,7 @@ class RefinementRuleProvider {
430 data.containerInverseInterpretation, 389 data.containerInverseInterpretation,
431 data.constructor, 390 data.constructor,
432 data.recursiveConstructors, 391 data.recursiveConstructors,
433 scopePropagator 392 unitRulePropagator
434 ) 393 )
435 } else { 394 } else {
436 createObjectActionWithContainment( 395 createObjectActionWithContainment(
@@ -441,7 +400,7 @@ class RefinementRuleProvider {
441 data.containerInterpretation, 400 data.containerInterpretation,
442 data.constructor, 401 data.constructor,
443 data.recursiveConstructors, 402 data.recursiveConstructors,
444 scopePropagator 403 unitRulePropagator
445 ) 404 )
446 } 405 }
447 } else { 406 } else {
@@ -451,7 +410,7 @@ class RefinementRuleProvider {
451 data.typeInterpretation, 410 data.typeInterpretation,
452 data.constructor, 411 data.constructor,
453 data.recursiveConstructors, 412 data.recursiveConstructors,
454 scopePropagator 413 unitRulePropagator
455 ) 414 )
456 } 415 }
457 416
@@ -466,7 +425,7 @@ class RefinementRuleProvider {
466 PartialRelationInterpretation inverseRelationInterpretation, 425 PartialRelationInterpretation inverseRelationInterpretation,
467 Function0<DefinedElement> constructor, 426 Function0<DefinedElement> constructor,
468 List<ObjectCreationInterpretationData> recursiceObjectCreations, 427 List<ObjectCreationInterpretationData> recursiceObjectCreations,
469 ScopePropagator scopePropagator 428 UnitRulePropagator unitRulePropagator
470 ) { 429 ) {
471 val newElement = constructor.apply 430 val newElement = constructor.apply
472 if (nameNewElement) { 431 if (nameNewElement) {
@@ -486,14 +445,16 @@ class RefinementRuleProvider {
486 inverseRelationInterpretation.relationlinks += newLink2 445 inverseRelationInterpretation.relationlinks += newLink2
487 446
488 // Scope propagation 447 // Scope propagation
489 scopePropagator.decrementTypeScope(typeInterpretation) 448 unitRulePropagator.decrementTypeScope(typeInterpretation)
449 unitRulePropagator.addedToRelation(relationInterpretation.interpretationOf)
450 unitRulePropagator.addedToRelation(inverseRelationInterpretation.interpretationOf)
490 451
491 // Existence 452 // Existence
492 interpretation.newElements += newElement 453 interpretation.newElements += newElement
493 454
494 // Do recursive object creation 455 // Do recursive object creation
495 for (newConstructor : recursiceObjectCreations) { 456 for (newConstructor : recursiceObjectCreations) {
496 createObjectAction(nameNewElement, newConstructor, newElement, scopePropagator) 457 createObjectAction(nameNewElement, newConstructor, newElement, unitRulePropagator)
497 } 458 }
498 459
499 return newElement 460 return newElement
@@ -507,7 +468,7 @@ class RefinementRuleProvider {
507 PartialRelationInterpretation relationInterpretation, 468 PartialRelationInterpretation relationInterpretation,
508 Function0<DefinedElement> constructor, 469 Function0<DefinedElement> constructor,
509 List<ObjectCreationInterpretationData> recursiceObjectCreations, 470 List<ObjectCreationInterpretationData> recursiceObjectCreations,
510 ScopePropagator scopePropagator 471 UnitRulePropagator unitRulePropagator
511 ) { 472 ) {
512 val newElement = constructor.apply 473 val newElement = constructor.apply
513 if (nameNewElement) { 474 if (nameNewElement) {
@@ -522,16 +483,17 @@ class RefinementRuleProvider {
522 // ContainmentRelation 483 // ContainmentRelation
523 val newLink = factory2.createBinaryElementRelationLink => [it.param1 = container it.param2 = newElement] 484 val newLink = factory2.createBinaryElementRelationLink => [it.param1 = container it.param2 = newElement]
524 relationInterpretation.relationlinks += newLink 485 relationInterpretation.relationlinks += newLink
486 unitRulePropagator.addedToRelation(relationInterpretation.interpretationOf)
525 487
526 // Scope propagation 488 // Scope propagation
527 scopePropagator.decrementTypeScope(typeInterpretation) 489 unitRulePropagator.decrementTypeScope(typeInterpretation)
528 490
529 // Existence 491 // Existence
530 interpretation.newElements += newElement 492 interpretation.newElements += newElement
531 493
532 // Do recursive object creation 494 // Do recursive object creation
533 for (newConstructor : recursiceObjectCreations) { 495 for (newConstructor : recursiceObjectCreations) {
534 createObjectAction(nameNewElement, newConstructor, newElement, scopePropagator) 496 createObjectAction(nameNewElement, newConstructor, newElement, unitRulePropagator)
535 } 497 }
536 498
537 return newElement 499 return newElement
@@ -539,7 +501,7 @@ class RefinementRuleProvider {
539 501
540 protected def createObjectAction(boolean nameNewElement, PartialInterpretation interpretation, 502 protected def createObjectAction(boolean nameNewElement, PartialInterpretation interpretation,
541 PartialTypeInterpratation typeInterpretation, Function0<DefinedElement> constructor, 503 PartialTypeInterpratation typeInterpretation, Function0<DefinedElement> constructor,
542 List<ObjectCreationInterpretationData> recursiceObjectCreations, ScopePropagator scopePropagator) { 504 List<ObjectCreationInterpretationData> recursiceObjectCreations, UnitRulePropagator unitRulePropagator) {
543 val newElement = constructor.apply 505 val newElement = constructor.apply
544 if (nameNewElement) { 506 if (nameNewElement) {
545 newElement.name = '''new «interpretation.newElements.size»''' 507 newElement.name = '''new «interpretation.newElements.size»'''
@@ -552,38 +514,220 @@ class RefinementRuleProvider {
552 } 514 }
553 515
554 // Scope propagation 516 // Scope propagation
555 scopePropagator.decrementTypeScope(typeInterpretation) 517 unitRulePropagator.decrementTypeScope(typeInterpretation)
556 518
557 // Existence 519 // Existence
558 interpretation.newElements += newElement 520 interpretation.newElements += newElement
559 521
560 // Do recursive object creation 522 // Do recursive object creation
561 for (newConstructor : recursiceObjectCreations) { 523 for (newConstructor : recursiceObjectCreations) {
562 createObjectAction(nameNewElement, newConstructor, newElement, scopePropagator) 524 createObjectAction(nameNewElement, newConstructor, newElement, unitRulePropagator)
563 } 525 }
564 526
565 return newElement 527 return newElement
566 } 528 }
567 529
568 protected def boolean createRelationLinkAction(DefinedElement src, DefinedElement trg, 530 protected def createRelationLinkAction(IPatternMatch match, UnitRulePropagator unitRulePropagator) {
569 PartialRelationInterpretation relationInterpretation) { 531 // val problem = match.get(0) as LogicProblem
532 // val interpretation = match.get(1) as PartialInterpretation
533 val relationInterpretation = match.get(2) as PartialRelationInterpretation
534 val src = match.get(3) as DefinedElement
535 val trg = match.get(4) as DefinedElement
536 createRelationLinkAction(src, trg, relationInterpretation, unitRulePropagator)
537 }
538
539 protected def void createRelationLinkAction(DefinedElement src, DefinedElement trg,
540 PartialRelationInterpretation relationInterpretation, UnitRulePropagator unitRulePropagator) {
570 val link = createBinaryElementRelationLink => [it.param1 = src it.param2 = trg] 541 val link = createBinaryElementRelationLink => [it.param1 = src it.param2 = trg]
571 relationInterpretation.relationlinks += link 542 relationInterpretation.relationlinks += link
543 unitRulePropagator.addedToRelation(relationInterpretation.interpretationOf)
572 } 544 }
573 545
574 protected def boolean createRelationLinkWithInverse(DefinedElement src, DefinedElement trg, 546 protected def void createRelationLinkWithInverse(IPatternMatch match, UnitRulePropagator unitRulePropagator) {
575 PartialRelationInterpretation relationInterpretation, PartialRelationInterpretation inverseInterpretation) { 547 // val problem = match.get(0) as LogicProblem
548 // val interpretation = match.get(1) as PartialInterpretation
549 val relationInterpretation = match.get(2) as PartialRelationInterpretation
550 val inverseInterpretation = match.get(3) as PartialRelationInterpretation
551 val src = match.get(4) as DefinedElement
552 val trg = match.get(5) as DefinedElement
553 createRelationLinkWithInverse(src, trg, relationInterpretation, inverseInterpretation, unitRulePropagator)
554 }
555
556 protected def void createRelationLinkWithInverse(DefinedElement src, DefinedElement trg,
557 PartialRelationInterpretation relationInterpretation, PartialRelationInterpretation inverseInterpretation,
558 UnitRulePropagator unitRulePropagator) {
576 val link = createBinaryElementRelationLink => [it.param1 = src it.param2 = trg] 559 val link = createBinaryElementRelationLink => [it.param1 = src it.param2 = trg]
577 relationInterpretation.relationlinks += link 560 relationInterpretation.relationlinks += link
578 val inverseLink = createBinaryElementRelationLink => [it.param1 = trg it.param2 = src] 561 val inverseLink = createBinaryElementRelationLink => [it.param1 = trg it.param2 = src]
579 inverseInterpretation.relationlinks += inverseLink 562 inverseInterpretation.relationlinks += inverseLink
563 unitRulePropagator.addedToRelation(relationInterpretation.interpretationOf)
564 unitRulePropagator.addedToRelation(inverseInterpretation.interpretationOf)
580 } 565 }
581 566
582 protected def flushQueryEngine(ScopePropagator scopePropagator) { 567 static class UnitRulePropagator {
583 if (scopePropagator.queryEngineFlushRequiredBeforePropagation && queryEngine.updatePropagationDelayed) { 568 val LogicProblem p
584 delayMessageDelivery.setBoolean(queryEngine, false) 569 val PartialInterpretation i
585 queryEngine.getQueryBackend(ReteBackendFactory.INSTANCE).flushUpdates 570 val RefinementRuleProvider refinementRuleProvider
586 delayMessageDelivery.setBoolean(queryEngine, true) 571 var AdvancedViatraQueryEngine queryEngine
572 var Field delayMessageDelivery
573 val ScopePropagator scopePropagator
574 val List<AbstractMustRelationPropagator<? extends IPatternMatch>> propagators
575 val ModelGenerationStatistics statistics
576
577 new(LogicProblem p, PartialInterpretation i, RefinementRuleProvider refinementRuleProvider,
578 ScopePropagator scopePropagator,
579 Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> mustRelationPropagationQueries,
580 ModelGenerationStatistics statistics) {
581 this.p = p
582 this.i = i
583 this.refinementRuleProvider = refinementRuleProvider
584 queryEngine = ViatraQueryEngine.on(new EMFScope(i)) as AdvancedViatraQueryEngine
585 delayMessageDelivery = queryEngine.class.getDeclaredField("delayMessageDelivery")
586 delayMessageDelivery.accessible = true
587 this.scopePropagator = scopePropagator
588 propagators = ImmutableList.copyOf(mustRelationPropagationQueries.entrySet.map [ entry |
589 val matcher = queryEngine.getMatcher(entry.value)
590 getPropagator(entry.key.key, entry.key.value, matcher)
591 ])
592 this.statistics = statistics
593 }
594
595 def decrementTypeScope(PartialTypeInterpratation partialTypeInterpratation) {
596 scopePropagator.decrementTypeScope(partialTypeInterpratation)
597 }
598
599 def addedToRelation(Relation r) {
600 scopePropagator.addedToRelation(r)
601 }
602
603 def propagate() {
604 var boolean changed
605 do {
606 val scopeChanged = propagateScope()
607 val mustChanged = propagateMustRelations()
608 changed = scopeChanged || mustChanged
609 } while (changed)
610 }
611
612 protected def flushQueryEngine() {
613 if (queryEngine.updatePropagationDelayed) {
614 delayMessageDelivery.setBoolean(queryEngine, false)
615 queryEngine.getQueryBackend(ReteBackendFactory.INSTANCE).flushUpdates
616 delayMessageDelivery.setBoolean(queryEngine, true)
617 }
618 }
619
620 protected def propagateScope() {
621 if (scopePropagator.scopePropagationNeeded) {
622 if (scopePropagator.queryEngineFlushRequiredBeforePropagation) {
623 flushQueryEngine()
624 }
625 val propagatorStartTime = System.nanoTime
626 scopePropagator.propagateAllScopeConstraints()
627 statistics.addScopePropagationTime(System.nanoTime - propagatorStartTime)
628 true
629 } else {
630 false
631 }
632 }
633
634 protected def propagateMustRelations() {
635 if (propagators.empty) {
636 return false
637 }
638 flushQueryEngine()
639 val propagatorStartTime = System.nanoTime
640 var changed = false
641 for (propagator : propagators) {
642 changed = propagator.propagate(p, i, refinementRuleProvider, this) || changed
643 }
644 statistics.addMustRelationPropagationTime(System.nanoTime - propagatorStartTime)
645 changed
646 }
647
648 private static def <T extends IPatternMatch> getPropagator(Relation relation, Relation inverseRelation,
649 ViatraQueryMatcher<T> matcher) {
650 if (inverseRelation === null) {
651 new MustRelationPropagator(matcher)
652 } else if (relation == inverseRelation) {
653 new MustRelationPropagatorWithSelfInverse(matcher)
654 } else {
655 new MustRelationPropagatorWithInverse(matcher)
656 }
657 }
658
659 @FinalFieldsConstructor
660 private static abstract class AbstractMustRelationPropagator<T extends IPatternMatch> {
661 val ViatraQueryMatcher<T> matcher
662
663 def propagate(LogicProblem p, PartialInterpretation i, RefinementRuleProvider refinementRuleProvider,
664 UnitRulePropagator unitRulePropagator) {
665 val iterator = getIterator(p, i)
666 if (!iterator.hasNext) {
667 return false
668 }
669 iterate(iterator, refinementRuleProvider, unitRulePropagator)
670 true
671 }
672
673 def iterate(Iterator<T> iterator, RefinementRuleProvider refinementRuleProvider,
674 UnitRulePropagator unitRulePropagator) {
675 while (iterator.hasNext) {
676 doPropagate(iterator.next, refinementRuleProvider, unitRulePropagator)
677 }
678 }
679
680 protected def getIterator(LogicProblem p, PartialInterpretation i) {
681 val partialMatch = matcher.newEmptyMatch
682 partialMatch.set(0, p)
683 partialMatch.set(1, i)
684 matcher.streamAllMatches(partialMatch).iterator
685 }
686
687 protected def void doPropagate(T match, RefinementRuleProvider refinementRuleProvider,
688 UnitRulePropagator unitRulePropagator)
689 }
690
691 private static class MustRelationPropagator<T extends IPatternMatch> extends AbstractMustRelationPropagator<T> {
692 new(ViatraQueryMatcher<T> matcher) {
693 super(matcher)
694 }
695
696 override protected doPropagate(T match, RefinementRuleProvider refinementRuleProvider,
697 UnitRulePropagator unitRulePropagator) {
698 refinementRuleProvider.createRelationLinkAction(match, unitRulePropagator)
699 }
700 }
701
702 private static class MustRelationPropagatorWithInverse<T extends IPatternMatch> extends AbstractMustRelationPropagator<T> {
703 new(ViatraQueryMatcher<T> matcher) {
704 super(matcher)
705 }
706
707 override protected doPropagate(T match, RefinementRuleProvider refinementRuleProvider,
708 UnitRulePropagator unitRulePropagator) {
709 refinementRuleProvider.createRelationLinkWithInverse(match, unitRulePropagator)
710 }
711 }
712
713 private static class MustRelationPropagatorWithSelfInverse<T extends IPatternMatch> extends MustRelationPropagatorWithInverse<T> {
714 new(ViatraQueryMatcher<T> matcher) {
715 super(matcher)
716 }
717
718 override iterate(Iterator<T> iterator, RefinementRuleProvider refinementRuleProvider,
719 UnitRulePropagator unitRulePropagator) {
720 val pairs = newHashSet
721 while (iterator.hasNext) {
722 val match = iterator.next
723 val src = match.get(4) as DefinedElement
724 val trg = match.get(5) as DefinedElement
725 if (!pairs.contains(trg -> src)) {
726 pairs.add(src -> trg)
727 doPropagate(match, refinementRuleProvider, unitRulePropagator)
728 }
729 }
730 }
587 } 731 }
588 } 732 }
589} 733}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend
index 67d25208..8e05665c 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend
@@ -229,6 +229,10 @@ class ViatraReasoner extends LogicReasoner {
229 it.value = (method.statistics.scopePropagationTime / 1000000) as int 229 it.value = (method.statistics.scopePropagationTime / 1000000) as int
230 ] 230 ]
231 it.entries += createIntStatisticEntry => [ 231 it.entries += createIntStatisticEntry => [
232 it.name = "MustRelationPropagationTime"
233 it.value = (method.statistics.mustRelationPropagationTime / 1000000) as int
234 ]
235 it.entries += createIntStatisticEntry => [
232 it.name = "TypeAnalysisTime" 236 it.name = "TypeAnalysisTime"
233 it.value = (method.statistics.preliminaryTypeAnalisisTime / 1000000) as int 237 it.value = (method.statistics.preliminaryTypeAnalisisTime / 1000000) as int
234 ] 238 ]
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java
index a2de1abc..4800f71d 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java
@@ -307,7 +307,6 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
307 307
308 public List<String> times = new LinkedList<String>(); 308 public List<String> times = new LinkedList<String>();
309 private void saveTimes() { 309 private void saveTimes() {
310 long statecoderTime = ((NeighbourhoodBasedPartialInterpretationStateCoder<?, ?>)this.context.getStateCoder()).getStatecoderRuntime()/1000000;
311 long forwardTime = context.getDesignSpaceManager().getForwardTime()/1000000; 310 long forwardTime = context.getDesignSpaceManager().getForwardTime()/1000000;
312 long backtrackingTime = context.getDesignSpaceManager().getBacktrackingTime()/1000000; 311 long backtrackingTime = context.getDesignSpaceManager().getBacktrackingTime()/1000000;
313 long activationSelection = this.activationSelector.getRuntime()/1000000; 312 long activationSelection = this.activationSelector.getRuntime()/1000000;
@@ -317,8 +316,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
317 long numericalSolverSolving = this.numericSolver.getSolverSolvingProblem()/1000000; 316 long numericalSolverSolving = this.numericSolver.getSolverSolvingProblem()/1000000;
318 long numericalSolverInterpreting = this.numericSolver.getSolverSolution()/1000000; 317 long numericalSolverInterpreting = this.numericSolver.getSolverSolution()/1000000;
319 this.times.add( 318 this.times.add(
320 "(TransformationExecutionTime"+method.getStatistics().transformationExecutionTime/1000000+ 319 "(TransformationExecutionTime"+method.getStatistics().transformationExecutionTime/1000000+
321 "|StateCoderTime:"+statecoderTime+
322 "|ForwardTime:"+forwardTime+ 320 "|ForwardTime:"+forwardTime+
323 "|Backtrackingtime:"+backtrackingTime+ 321 "|Backtrackingtime:"+backtrackingTime+
324 "|GlobalConstraintEvaluationTime:"+(globalConstraintEvaluationTime/1000000)+ 322 "|GlobalConstraintEvaluationTime:"+(globalConstraintEvaluationTime/1000000)+
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend
index 8d6523b1..300f8b51 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemHint.xtend
@@ -4,6 +4,8 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic
4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace 4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace
5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory 5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory
6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator 6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator
7import java.util.Map
8import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
7 9
8class FileSystemHint extends Ecore2LogicTraceBasedHint { 10class FileSystemHint extends Ecore2LogicTraceBasedHint {
9 static val REMAINING_CONTENTS_ROOT = "hint_root" 11 static val REMAINING_CONTENTS_ROOT = "hint_root"
@@ -12,7 +14,7 @@ class FileSystemHint extends Ecore2LogicTraceBasedHint {
12 super(ecore2Logic, trace) 14 super(ecore2Logic, trace)
13 } 15 }
14 16
15 override getAdditionalPatterns(PatternGenerator it) ''' 17 override getAdditionalPatterns(PatternGenerator it, Map<String, PQuery> fqnToPQuery) '''
16 pattern «REMAINING_CONTENTS_ROOT»(problem:LogicProblem, interpretation:PartialInterpretation, remainingContents:java Integer) { 18 pattern «REMAINING_CONTENTS_ROOT»(problem:LogicProblem, interpretation:PartialInterpretation, remainingContents:java Integer) {
17 find interpretation(problem, interpretation); 19 find interpretation(problem, interpretation);
18 remainingContents == sum find remainingContents_root_reference_Dir_helper(problem, interpretation, _, #_) 20 remainingContents == sum find remainingContents_root_reference_Dir_helper(problem, interpretation, _, #_)
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend
index 97ce4ee6..9a84f777 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend
@@ -4,13 +4,15 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic
4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace 4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace
5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory 5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory
6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator 6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator
7import java.util.Map
8import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
7 9
8class SGraphHint extends Ecore2LogicTraceBasedHint { 10class SGraphHint extends Ecore2LogicTraceBasedHint {
9 new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { 11 new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) {
10 super(ecore2Logic, trace) 12 super(ecore2Logic, trace)
11 } 13 }
12 14
13 override getAdditionalPatterns(extension PatternGenerator patternGenerator) { 15 override getAdditionalPatterns(extension PatternGenerator patternGenerator, Map<String, PQuery> fqnToPQuery) {
14 "" 16 ""
15 } 17 }
16 18
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend
index ef5b779e..28954d60 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend
@@ -5,6 +5,8 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace
5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality 5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality
6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory 6import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory
7import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator 7import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator
8import java.util.Map
9import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
8 10
9class SatelliteHint extends Ecore2LogicTraceBasedHint { 11class SatelliteHint extends Ecore2LogicTraceBasedHint {
10 static val INTERFEROMETY_PAYLOAD = "hint_interferometryPayload" 12 static val INTERFEROMETY_PAYLOAD = "hint_interferometryPayload"
@@ -14,7 +16,7 @@ class SatelliteHint extends Ecore2LogicTraceBasedHint {
14 super(ecore2Logic, trace) 16 super(ecore2Logic, trace)
15 } 17 }
16 18
17 override getAdditionalPatterns(PatternGenerator it) ''' 19 override getAdditionalPatterns(PatternGenerator it, Map<String, PQuery> fqnToPQuery) '''
18 pattern «INTERFEROMETY_PAYLOAD»(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement) { 20 pattern «INTERFEROMETY_PAYLOAD»(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement) {
19 find interpretation(problem, interpretation); 21 find interpretation(problem, interpretation);
20 find mustExist(problem, interpretation, object); 22 find mustExist(problem, interpretation, object);
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
index b65826ad..5e2d0920 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
@@ -1,9 +1,8 @@
1package hu.bme.mit.inf.dslreasoner.run 1package hu.bme.mit.inf.dslreasoner.run
2 2
3import functionalarchitecture.FunctionalarchitecturePackage 3import functionalarchitecture.FunctionalarchitecturePackage
4import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model
4import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns 5import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns
5import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Model
6import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Type
7import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic 6import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic
8import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration 7import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration
9import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor 8import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor
@@ -15,7 +14,6 @@ import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore
15import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic 14import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic
16import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration 15import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration
17import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor 16import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor
18import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy
19import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic 17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic
20import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 18import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
21import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml 19import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml
@@ -121,8 +119,6 @@ class SimpleRun {
121 val patterns = i.specifications.toList 119 val patterns = i.specifications.toList
122 val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet 120 val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet
123 val derivedFeatures = new LinkedHashMap 121 val derivedFeatures = new LinkedHashMap
124 derivedFeatures.put(Type.instance,metamodel.attributes.filter[it.name == "type"].head)
125 derivedFeatures.put(Model.instance,metamodel.references.filter[it.name == "model"].head)
126 val res = new ViatraQuerySetDescriptor( 122 val res = new ViatraQuerySetDescriptor(
127 patterns, 123 patterns,
128 wfPatterns, 124 wfPatterns,